1] Winform App with Scheduler |
We have already provided the dashboard sample in following location for schedule control.
<Installed_location>/Syncfusion/EssentialStudio/<build_version>/Samples/windows/Schedule/Schedule.Windows/Samples/Scheduler Demo/cs
|
2] Winform App with Scheduler and SQL databinding |
We have created a sample for adding the SQL data into the Schedule control as per your requirement. In this sample we have populated the ScheduleControl with the sql database. Please refer to the following sample,
Note:
To work with the SQL data at your client machine, please modify the connection string by creating a data base using the SQL Express and add the table “ScheduleData” like the attached local db file.
|
3] Winform App with Scheduler and multiple Resources (grouping) |
Currently we do not have the support for this feature so we have logged the feature report to add the multi resources on the header. So it will be available on any of our upcoming release. |
//Event triggering
this.scheduleControl1.ItemChanged += ScheduleControl1_ItemChanged;
//Event customization
private void ScheduleControl1_ItemChanged(object sender, ScheduleAppointmentEventArgs e)
{
BindingSource Bnd1 = new BindingSource();
Bnd1.DataSource = SimpleArrayListProvider.data;
//To get the modified row.
int rowNo = Bnd1.Find("UniqueID", e.CurrentItem.UniqueID);
if (rowNo != -1)
{
//Update changes when the existing record modified.
if (e.Action == ItemAction.Edit)
{
SimpleArrayListProvider.data.Rows[rowNo]["Subject"] = e.CurrentItem.Subject;
SimpleArrayListProvider.data.Rows[rowNo]["Content"] = e.CurrentItem.Content;
SimpleArrayListProvider.data.Rows[rowNo]["StartTime"] = e.CurrentItem.StartTime;
SimpleArrayListProvider.data.Rows[rowNo]["EndTime"] = e.CurrentItem.EndTime;
SimpleArrayListProvider.data.Rows[rowNo]["Label"] = e.CurrentItem.LabelValue;
}
//Update the DB when a row is deleted.
else if (e.Action == ItemAction.Delete)
{
SimpleArrayListProvider.data.Rows[rowNo].Delete();
}
}
//Update the changes when an appointment is added.
else if (rowNo == -1 && e.Action == ItemAction.Add)
{
DataRow row = SimpleArrayListProvider.data.NewRow();
row["Subject"] = e.CurrentItem.Subject;
row["Content"] = e.CurrentItem.Content;
row["StartTime"] = e.CurrentItem.StartTime;
row["EndTime"] = e.CurrentItem.EndTime;
row["Label"] = e.CurrentItem.LabelValue;
row["UniqueID"] = e.CurrentItem.UniqueID;
SimpleArrayListProvider.data.Rows.Add(row);
}
} |