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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Modify Delete Appointment Event

Thread ID:

Created:

Updated:

Platform:

Replies:

149523 Nov 28,2019 06:38 PM UTC Dec 2,2019 05:41 AM UTC WinForms 3
loading
Tags: ScheduleControl
Eric
Asked On November 28, 2019 06:38 PM UTC

Hi,

How can I override or catch the event when deleting appointments in schedule control.

What I did is right-click the appointment and click the "Delete Item" in context menu. 

Thanks.

Arulpriya Ramalingam [Syncfusion]
Replied On November 29, 2019 08:34 AM UTC

Hi Eric, 
 
Thank you for using support. 
 
We already provided a knowledge base document to subscribe the DeleteItemClick event of ScheduleControl. Please make use of below online document to implement it. 
 
 
Please get back to us, if you have any other queries. 
 
Regards, 
Arulpriya 


Eric
Replied On December 1, 2019 05:43 PM UTC

Hi,

I used to code provided in the link. But when I used it, I encounter an error saying "System.NullReferenceException: 'Object reference not set to an instance of an object.'".

This is the code that has an error:

//Get the menu items.
strip = this.scheduleControl1.GetScheduleHost().ContextMenuStrip;

Also, in the output logs, it says "**strip** was null."

Thanks

Arulpriya Ramalingam [Syncfusion]
Replied On December 2, 2019 05:41 AM UTC

Hi Eric, 
 
Thank you for the update. 
 
As per the ScheduleControl current behavior, the ContextMenuStrip will be initialized when the datasource for the ScheduleGrid is assigned. So, ensure that you are retrieving the ContextMenuStrip after the schedule is bounded with dataprovider. If still the issue exist at your end, we suspect that it might be occurred due to some other customization of ScheduleGrid. Please refer to the below sample and let us know the code part that causes the issue at your end which will be better for us to analyze further on this scenario. 
 
 
If you have any other queries, please get back to us. 
 
Regards, 
Arulpriya 


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon

Live Chat Icon For mobile
Live Chat Icon