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.
Unfortunately, activation email could not send to your email. Please try again.

Toggle appointment into resize mode

Thread ID:

Created:

Updated:

Platform:

Replies:

118134 Feb 3,2015 05:26 PM Aug 11,2016 12:51 AM WinRT 8
loading
Tags: SfSchedule
Ryan
Asked On February 3, 2015 05:26 PM

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

Jeyasri M [Syncfusion]
Replied On February 4, 2015 04:06 AM

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

Ryan
Replied On February 5, 2015 05:47 PM

Thanks Jeyasri, that sample was perfect.

Saranya CJ [Syncfusion]
Replied On February 8, 2015 11:18 PM

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



Ryan
Replied On August 9, 2016 07:37 PM

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

Vigneshkumar Ramasamy [Syncfusion]
Replied On August 10, 2016 12:45 AM

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  


Ryan
Replied On August 10, 2016 01:21 AM

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



Ryan
Replied On August 10, 2016 02:06 AM

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

Vigneshkumar Ramasamy [Syncfusion]
Replied On August 11, 2016 12:51 AM

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


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;