Is there a simple example available demonstrating how to drag from an external non-ScheduleView source onto a specific slot within a ScheduldeView in order to create a new appointment based on the dragged-in object? If not, would it at least be possible to provide some pointers as to how I can achieve this?
6 Answers, 1 is accepted
The DragDropEventArgs (e) is not null, so I guess that GetNewTime() doesn't like something about one of its members.
The DragQuery handler is lifted straight from http://www.telerik.com/help/silverlight/raddraganddrop-items-onto-radscheduler.html:
Can anybody see what I'm missing that causes RadDragAndDropExtensions.GetNewTime() to throw the NullReferenceException?
System.NullReferenceException was unhandled by user code
Message=Object reference not set to an instance of an object.
at Telerik.Windows.Controls.RadDragAndDropExtensions.GetNewTime(DragDropEventArgs e) in c:\Dev3\branches\2010.Q3.Release\Controls\ScheduleView\ScheduleView\Helpers\DragDropExtensions.cs:line 48
Again, any thoughts on this greatly appreciated, 'cos I'm getting a headache :~)
I found this sample helpful as well. One thing I haven't been able to figure out is how to get the destination value like resource assigned when dropping. My example is almost exactly like the Schedule View demo of Custom Styles> Group Header Styles. I want to know what resource has been assigned so that I can do some updating in the DB.
Thanks for any help provided!
You can access the resources of the destination slot by the following way;
SchedulerDragDropPayload payload = e.Options.Payload as SchedulerDragDropPayload
the Telerik team