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

Determine the ScheduleView in ScheduleViewDragDropBehavior's Drop event

2 Answers 41 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Rebecca
Top achievements
Rank 1
Rebecca asked on 17 Dec 2012, 03:23 PM
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 Answers, 1 is accepted

Sort by
0
Accepted
Yana
Telerik team
answered on 18 Dec 2012, 10:51 AM
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.

0
Rebecca
Top achievements
Rank 1
answered on 18 Dec 2012, 02:03 PM
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
Tags
ScheduleView
Asked by
Rebecca
Top achievements
Rank 1
Answers by
Yana
Telerik team
Rebecca
Top achievements
Rank 1
Share this question
or