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

Show Edit Dialog after dropping

1 Answer 18 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Brandon
Top achievements
Rank 1
Brandon asked on 03 Sep 2015, 02:27 PM

I have a 'placeholder' appointment that we place on the scheduleview via code upon loading the calendar.  We let the user drag the appointment to the correct date/time and would then like to show the Edit Appointment dialog for this 'new' appointment. 

The post here (http://www.telerik.com/forums/drag-and-drop-and-schedulerdialog) says this will be integrated in a later version in 2011.  How do we go about doing this from within the CustomDragDropBehavior?

Also the 'placeholder' appointment is NOT in the 'ScheduleViewRepository.Context' as I have excluded the placeholders from the 'NotifyCollectionChangedAction.Add' so it doesn't add all of them that are not dragged and created as actual appointments.  So can I add it add some point in the SqlAppointment class endedit somehow?

Thanks much!

1 Answer, 1 is accepted

Sort by
0
Accepted
Rosi
Telerik team
answered on 04 Sep 2015, 06:47 AM
Hi,

You can open the dialog on the Drop or DragDropCompleted method of DragDropBehavior with the following code:
var scheduleView = state.ServiceProvider.GetService<IObjectEditor<IAppointment>>() as ScheduleViewBase;
scheduleView.SelectedAppointment = null;
RadScheduleViewCommands.EditAppointment.Execute(appointment, scheduleView);

Please give it a try and let us know how this goes.

Regards,
Rosi
Telerik
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 Feedback Portal and vote to affect the priority of the items
Tags
ScheduleView
Asked by
Brandon
Top achievements
Rank 1
Answers by
Rosi
Telerik team
Share this question
or