Day determination for drag event

3 posts, 0 answers
  1. Terry Newton
    Terry Newton avatar
    21 posts
    Member since:
    Oct 2009

    Posted 05 Apr 2010 Link to this post

    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)()









    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.



  2. Konstantina
    Konstantina avatar
    2332 posts

    Posted 08 Apr 2010 Link to this post

    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.

    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.
  3. Terry Newton
    Terry Newton avatar
    21 posts
    Member since:
    Oct 2009

    Posted 16 Apr 2010 Link to this post

    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.
Back to Top