This is a migrated thread and some comments may be shown as answers.

[Solved] Fire Function After Delete Method

1 Answer 103 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Praveen
Top achievements
Rank 1
Praveen asked on 17 Apr 2009, 09:15 PM
How to fire a server side function after a appointment is deleted. I know AppointmentDelete fires before the appoinment gets deleted.

1 Answer, 1 is accepted

Sort by
0
Genady Sergeev
Telerik team
answered on 20 Apr 2009, 11:40 AM
Hi Praveen,

Indeed you are right, the AppointmentDelete event fires before an appointment gets deleted. However, you can set a flag in the AppointmentDelete event and then in the DataBound event check whether the flag is true or false. If it is true - proceed with an action. Example:

protected void RadScheduler1_DataBound(object sender, EventArgs e)
    {
        if (Session["AptDeleted"] != null && (bool)Session["AptDeleted"] == true)
        {
            //Do something
            Session["AptDeleted"] = false;
        }
    }
    protected void RadScheduler1_AppointmentDelete(object sender, SchedulerCancelEventArgs e)
    {
        Session["AptDeleted"] = true;
    }

Regards,
Genady Sergeev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Scheduler
Asked by
Praveen
Top achievements
Rank 1
Answers by
Genady Sergeev
Telerik team
Share this question
or