LK
Lakxman Kumar C
Syncfusion Team
July 21, 2010 03:38 PM UTC
Hi Arun,
Thank you for your interest in Syncfusion Products.
It is possible to add the appointments by dropping the grid records with the Total Hours. You can use the ExternalAppointmentDragging event and get the start time where the record is dropped by using the “StartTime” property of the ExternalAppointmentDragging event args. You can add the hours to the start time to compute the end time and add it to the schedule. Kindly find the code snippet below to achieve this.
[C#]
protected void schedule1_ExternalAppointmentDragging(object sender, Syncfusion.Web.UI.WebControls.ScheduleControl.ExternalAppointmentDraggingEventArgs e)
{
string shr = e.Data.Split(',')[2]; //get hours from grid
DateTime starttime = e.StartTime; //get Starttime where you drop the Resource in Schedule
int hr = int.Parse(shr);
DateTime endtime = starttime.AddHours(hr);
//Here the appointments can be added to the schedule using the start time and end time.
}
Kindly try the above and please let us know if any concerns.
Regards,
Lakxman Kumar C