Hey Guys,
Looking for some guidance here about drag and drop onto a ultradayview.
i have a list view with people’s names on it and i want to be able to drag from the list view and drop onto the ultradayview and it creates the entry/appointment for that person where i have dropped it.
I have setup the events for the listview for drag enter and have been able to create the event for dragdrop for the ultradayview, but i can not work out how to work out where i have dropped it and how to create the appointment for it
Thanks in advance for any help or guidance you can offer
Cheers Phil
This has been done to death... here is an article on how to do it.
http://devcenter.infragistics.com/Support/KnowledgeBaseArticle.aspx?ArticleID=7100
CheersAaron
excellent, thats a great example, sorry i could not find that.
I will keep looking around as this creating the appointments for current date, not date you drop onto, but thanks for the great starting point!
Cheers
i see that when you drop onto the ultradayview you get the timeslot by using
"Me.UltraDayView1.GetTimeSlotFromPoint(Me.UltraDayView1.PointToClient(New Point(e.X, e.Y)))"
but is there a way to work out the DATE you are dropping onto?
' Create new DateTimes to use to make the appointmentDim day As UltraWinSchedule.Day = Me.UltraDayView1.GetVisibleDayFromPoint(Me.UltraDayView1.PointToClient(New Point(e.X, e.Y))).DayDim myStartDateTime As New DateTime(day.Date.Year, day.Date.Month, day.Date.Day, myTimeSlot.StartTime.Hour, myTimeSlot.StartTime.Minute, myTimeSlot.StartTime.Second)Dim myEndDateTime As New DateTime(day.Date.Year, day.Date.Month, day.Date.Day, myTimeSlot.EndTime.Hour, myTimeSlot.EndTime.Minute, myTimeSlot.EndTime.Second)' Timeslot was defined and can be used to create appointmentDim myAppointment As New Appointment(myStartDateTime, myEndDateTime)Dim own As Owner = Me.UltraDayView1.GetOwnerFromPoint(Me.UltraDayView1.PointToClient(New Point(e.X, e.Y)))
myAppointment.Owner = own
sorry, next time i will continue to look before i ask so quickly
FOUND IT
Me.UltraDayView1.GetVisibleDayFromPoint((Me.UltraDayView1.PointToClient(New Point(e.X, e.Y)))).Date