This is a migrated thread and some comments may be shown as answers.

Day determination for drag event

2 Answers 45 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Terry Newton
Top achievements
Rank 1
Terry Newton asked on 05 Apr 2010, 09:34 PM
I need to determine the day when I recieve a drag event.  I am currently trying this for the Week view.  My control implements a calendar control.  I use:

For Each oTimeItem In ctlScheduler.ChildrenOfType(Of TimeSlotItem)()

oTimeItem.SetValue(Telerik.Windows.Controls.DragDrop.RadDragAndDropManager.AllowDropProperty,

 

True)

 

Next

 

 

 

as is indicated in blogs and eles where to tie in the drop events in the destination control.  I recieve the drag event info in: 

 

 

Private Sub OnDropInfo(ByVal sender As Object, ByVal e As DragDropEventArgs)
also from various pointers.  I confirm for the month view it is an event I want checking the type of the e.destination and the datacontext, but I do not find any in the day or week view, even though my appointments show across all views. I can get my drop events to fire if I use  the type SchedulerPresenter instead of TimeSlotItem problem is that I can not determine the date as it does not have the DataContext the TimeSlotItem would have.  The information presented at the time of the event by SchedulerPresenter does not appear to provide an accessable presentation of the date of the destination.
How can I get this?  The scheduler item has a selected date, but this is not the date where I am truing to drop the item.  Where can I get the date?

Thank you for any help you can provide.

Terry

 

2 Answers, 1 is accepted

Sort by
0
Konstantina
Telerik team
answered on 08 Apr 2010, 01:18 PM
Hello Terry,

Thank you for contacting us.

If I have understood you right, you want to get the date in which the appointment is dropped. If you followed the blog post, then you can get it from the timeSlotItem variable in the OnDropInfo event, like so:

DateTime date = timeSlotItem.TimeSlot.Start;

Hope this helps.

If you have any other questions please feel free to contact us again.

Greetings,
Konstantina
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Terry Newton
Top achievements
Rank 1
answered on 17 Apr 2010, 12:57 AM
This was resolved when the timeslotitems became available again as a result of changing some of the event logic.  My lists were apparently not populating before I was trying to use them.
Tags
Calendar
Asked by
Terry Newton
Top achievements
Rank 1
Answers by
Konstantina
Telerik team
Terry Newton
Top achievements
Rank 1
Share this question
or