We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Toggle appointment into resize mode

Hi,

I am creating my own context menu by using the method described here http://www.syncfusion.com/kb/2686/how-to-customize-the-context-menu-in-sfschedule. I would however like to recreate the default "Resize" menu option. How do I toggle a selected appointment so that it is in resize mode?

Thanks
Ryan

8 Replies

JM Jeyasri M Syncfusion Team February 4, 2015 09:06 AM UTC

Hi Ryan,

 

Thanks for using Syncfusion product.

 

Your requirement can be achieved by using DragAndDropCommand of ScheduleCommands, which is used for enabling the Resize Operation. And this command also used to drag and drop the selected appointments from one timeslot to another timeslot.

 

For your reference we have prepared the sample for ContextMenu Customization with Resize Option. Please find the sample from attachment.

Note: In attached sample we have handled the DragAndDropCommand in resizeButton_Click event to perform the Resize operation.

 

Please let us know if you need any further assistance.


Regards,

Jeyasri M


Attachment: CustomizingRadialMenu_WinRT_1a5b0608.zip


RY Ryan February 5, 2015 10:47 PM UTC

Thanks Jeyasri, that sample was perfect.


SC Saranya CJ Syncfusion Team February 9, 2015 04:18 AM UTC

Hi Ryan,
 
Please let us know if you require any other assistance on this.
 
Regards,
Saranya




RY Ryan August 9, 2016 11:37 PM UTC

Hi just a follow up question, how do I get the appointment to exit resize mode? Calling e.Cancel = true does not seem to work in the AppointmentEndResizing event. I am on version 13.4810.0.53


VR Vigneshkumar Ramasamy Syncfusion Team August 10, 2016 04:45 AM UTC

Hi Ryan,  
As of now your requirement of disabling the animation once complete the DragAndDrop/Resize operation can be achieved by using ScheduleCommands in the schedule control. Based on your requirement we have prepared a sample and please find the sample in the below link.  
Sample Link: SfSchedule_Resize

 In the above sample we have used below code snippet to stop the animation after finishing move/resize.  
  
   private void Schedule_AppointmentEditorOpening(object sender, AppointmentEditorOpeningEventArgs e)  
        {  
            if(isAppointmentDrggedOrResized)  
            {  
                e.Cancel = true;  
                isAppointmentDrggedOrResized = false;  
            }  
        }  
        private void Schedule_AppointmentEndResizing(object sender, AppointmentEndResizingEventArgs e)  
        {  
            isAppointmentDrggedOrResized = true;  
            ScheduleCommands.EditCommand.Execute(this.schedule);  
        }  
        private void Schedule_AppointmentEndDragging(object sender, AppointmentEndDraggingEventArgs e)  
        {  
            isAppointmentDrggedOrResized = true;  
            ScheduleCommands.EditCommand.Execute(this.schedule);  
       }  
  
In the above code snippet, we have used the EditCommand to stop the DragAndADrop/Resize animation.  
Regards  
Vigneshkumar R  



RY Ryan August 10, 2016 05:21 AM UTC

Thanks Vigneshkumar, that's an iteresting solution but it worked. It's worth noting that calling the EditCommand consequently invokes the AppointmentEditorOpening event which was problematic but I've coded around it.

Thanks again for your prompt reply.
Ryan




RY Ryan August 10, 2016 06:06 AM UTC

Apologies, I just realised your sample covered the EditorOpening event. Thanks again!


VR Vigneshkumar Ramasamy Syncfusion Team August 11, 2016 04:51 AM UTC

Hi Ryan, 
Thanks for your update. Please let us know us know if you require further assistance on this. 
Regards 
Vigneshkumar R 


Loader.
Up arrow icon