Determine the ScheduleView in ScheduleViewDragDropBehavior's Drop event

3 posts, 1 answers
  1. Rebecca
    Rebecca avatar
    28 posts
    Member since:
    Nov 2010

    Posted 17 Dec 2012 Link to this post

    Hi,

    I have 4 ScheduleViews on one page to represent a particular concept in my application.
    I have created a class that inherits from ScheduleViewDragDropBehavior.

    How do I determine which ScheduleView is being subjected to the drop (the "sender") within Drop method?

    Thank you,

    - Rebecca
  2. Answer
    Yana
    Admin
    Yana avatar
    4554 posts

    Posted 18 Dec 2012 Link to this post

    Hi Rebecca,

    You can use the following approach to get the ScheduleView inside Drop method:

    public override void Drop(Telerik.Windows.Controls.DragDropState state)
    {          
        var scheduleView = state.ServiceProvider.GetService<IObjectEditor<IAppointment>>() as RadScheduleView;
        base.Drop(state);          
    }

    Hope this helps.

    Greetings,
    Yana
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. UI for WPF is Visual Studio 2017 Ready
  4. Rebecca
    Rebecca avatar
    28 posts
    Member since:
    Nov 2010

    Posted 18 Dec 2012 Link to this post

    Thank you very much for the answer.

    I ended up solving the problem a by creating a custom list that I could reference through the state.DestinationAppointmentsSource property. I was able to determine what I needed to through properties on my custom list.

    It is good to know how to reference the ScheduleView though.

    Thanks,

    -Rebecca
Back to Top