can I run any code After resize Occurrence?

2 posts, 0 answers
  1. Gts
    Gts avatar
    17 posts
    Member since:
    Jul 2012

    Posted 14 May 2014 Link to this post

    Hi. Can I run any code after resize Occurrence? For example E have event appointment with start time 10:00 and and time 11:00
    user resize this occurrence and set new time interval from 10:00 to 11:30. And I need show user my custom dialog with question. for example "Do you want change time for current user or for All users) and after user selection I must run my code.
    How can I do this?
  2. Rosi
    Rosi avatar
    2527 posts

    Posted 16 May 2014 Link to this post


    There are several ways that you can do this:

    1.You can customize the resize behavior by implementing custom DragDropBehavior class and override the Resize method as it is described in our documentation. In this method you can display dialog and modify the resized appointment.

    2.Use AppointmentEditing/AppointmentEdited events and execute your code there. In this case you will still need to override the Resize method in order to recognize whether the appointment is edited by resize.
    For example:
    operation can be easy. Here is sample code:
    public class CustomDragDropBehavior : ScheduleViewDragDropBehavior
        public ScopeFlag IsResizing { get; set; }
        public CustomDragDropBehavior()
            this.IsResizing = new SingleScopeFlag();
        public override void Resize(DragDropState state)
            using (this.IsResizing.BeginScope())

    private void OnRadScheduleViewAppointmentEdited(object sender, Telerik.Windows.Controls.AppointmentEditedEventArgs e)
        var scheduleView = (RadScheduleView)sender;
        var customDragDropBehavior = (CustomDragDropBehavior)sv.DragDropBehavior;
        if (customDragDropBehavior.IsResizing.IsActive)
            RadWindow.Alert("Changed by drag-drop/resize");

    In this example a class from Telerik's assemblies was use for the flag - SingleScopeFlag. However you can always use a simple boolean flag that is true while the drag or resize operation is happening.

    3.You can customize the dialog that is displayed by design when an occurrence of recurring appointment is edited and then again use the AppointmentEdited to save the changes.

    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
  3. DevCraft R3 2016 release webinar banner
Back to Top