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

Appointment Drag&Drop - Show ChildWindow with warnings

1 Answer 47 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Björn
Top achievements
Rank 1
Björn asked on 14 Mar 2012, 11:32 AM
I want to show a ChildWindow with warnings when the user is drag&drop an appointment if there are resources (teachers) bound to it.
Example: 'You have to inform the teacher about changing the appointment. Do you really want that? Yes/No'
If the user confirm that, it will change the appointment, otherwise will cancel it.
Where can I place the ChildWindow in the event process?

During D&D the following events are fired:
- CanDrop: if the return value is false, it will not drag&drop
- Drop
- AppointmentEditing
- AppointmentSaving: if set e.Cancel = true; it will not save the appointment    
- AppointmentEdited
- DragDropCompleted

I tried to integrate the ChildWindow in the AppointmentSaving, but the problem is that ChildWindow is popup and it will continue with the operation, so that it will ignore at the end the e.Cancel setting.
When I use the 'System.Windows.Browser.HtmlPage.Window.Confirm(message)' it will freeze the application until the user press a button (in Firefox the main window is no more visible).

What to do?

Thanks
Björn.

1 Answer, 1 is accepted

Sort by
0
Accepted
Konstantina
Telerik team
answered on 19 Mar 2012, 11:02 AM
Hello Björn,

The best approach is to override the CanDrop method and show the MessageBox there. You are absolutely right to use the MessageBox instead of the ChildWindow. Also, you could try to customize the VisualCue of the dragged appointment to show the needed information there. More information about the drag and drop functionality of the RadScheduleView you could find in this help article and this demo.

Hope this information helps.

Greetings,
Konstantina
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Tags
ScheduleView
Asked by
Björn
Top achievements
Rank 1
Answers by
Konstantina
Telerik team
Share this question
or