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

deselecting appointment after drag-drop

1 Answer 39 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Steven
Top achievements
Rank 1
Steven asked on 16 May 2012, 07:26 AM
Hello,

I've implemented some custom drag-drop (drag-and-swap) stuff to deal with dragging to a slot where there are more than one appointment in the slot. I'e overriden the drop function in a ScheduleViewDragDropBehavior sub-class such that not all code paths will call the base Drop function. This is all good, however, if I dont call the Drop function on the base class, the source appointment remains selected, that is, until I mouse over it. How do I deselect the source appointment (either deselect a specific appt or all appts) after what I deem to be an invalid drag-drop attempt and therefore dont call base.Drop(...) ?

Kind regards,

1 Answer, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 17 May 2012, 04:00 PM
Hello Steven,

You can find the ScheduleView and set its SelectedAppointment property to null:

var scheduleView = state.ServiceProvider.GetService<IObjectEditor<IAppointment>>() as RadScheduleView;
scheduleView.SelectedAppointment = null;

where state is the DragDropState.

All the best,
Yana
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
ScheduleView
Asked by
Steven
Top achievements
Rank 1
Answers by
Yana
Telerik team
Share this question
or