The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
I have a requirement that i want to drag and drop a resourse from a grid/HTML to schedule. I have found a solution in syncfusion essential studio samples but in that example start time and end time mentioned based on that it will create schedule.
But my requirement is i have just number of hours present in grid instead of start time and end time. When i drag and drop that how to find start time position in scheduling grid.
LKLakxman 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.