Appointment Drag&Drop - Show ChildWindow with warnings

2 posts, 1 answers
  1. Björn
    Björn avatar
    23 posts
    Member since:
    Mar 2011

    Posted 14 Mar 2012 Link to this post

    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?

  2. Answer
    Konstantina avatar
    2332 posts

    Posted 19 Mar 2012 Link to this post

    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.

    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  3. DevCraft R3 2016 release webinar banner
Back to Top