How to update database when drag/drop the appointment and delete the appointment

Hello,


I dont know how to proceed the below two in the scheduler control:

I have changed the view mode to Horizantal and i am unable to find the delete the option.

1) How to delete the appointment from server side coding.

2) How to update the appointment into my database when I use drag and drop from server side coding and what method i have to call when i use drag and drop/extend or reduce the appointment date.

Regards,
Kesavan


2 Replies

AD Administrator Syncfusion Team December 10, 2007 08:38 AM UTC

Hi Kesavan,

Thank you for using Syncfusion products.

Can you please followup the incident 39561 in this regard?

Regards,
Jaya



AD Administrator Syncfusion Team January 4, 2008 04:58 AM UTC


Hi Kesavan,

Please check out the response below.

Deleting Appointment

You can delete the appointment from the schedule control using RemoveAt method of Appointments collection.

The following code snippet illustrates this.

[C#]

Scheduler1.Appointments.RemoveAt(index);

Please refer the below sample that deletes appointment when ViewMode set to horizontal.

http://websamples.syncfusion.com/samples/Schedule.Web/5.2.0.25/P39561_4/main.htm

What method to call when drag and drop/extend or reduce the appointment date. Updating appointment into database when I use drag and drop from server side .

Setting AllowDrag property of Schedule control to true, allows to drag and drop the appointments between the resources inside the control. AppointmentDragged raises the server side function when the appointment is dragged. You can write the code to update the appointment in the database using AppointmentDragged event as follows.

[C#]

protected void Schedule1_AppointmentDragged(object sender, Syncfusion.Web.UI.WebControls.ScheduleControl.AppointmentDraggedEventArgs e)
{
DateTime StartTimeOld, EndTimeOld;
int OldOwner;
StartTimeOld = e.OldStartTime;
EndTimeOld = e.OldEndTime;
OldOwner = e.OldOwner;

//Do the database update here
}

Please let me know if you require any more details.

Regards,
Jaya


Loader.
Up arrow icon