$99 VS $1000+. UI Control for ASP.NET AJAX(contains chart and gridview).
Scheduler control for Windows Forms
Create rich Outlook style functionality and add rich scheduling interfaces to C# Windows application
Home > WinForms UI Controls > User Manual > Custom Fields for Scheduler DataBinding in C#

KetticScheduler Data Binding to Custom Fields in C#.NET

KetticScheduler .NET component supports of data binding to custom fields. This control provides large flexibility to bind data source in Windows Forms. The KetticScheduler WinForms control allows the users to easily bind this component to data source through the SchedulerBindingDataSource property. It supports data source in the form of a database, which should be conform to a specific structure and provide specific fields, as well as business objects.

C# Guide to Bind KetticScheduler to Custom Fields

KetticScheduler WinForms control completely support data binding to custom fields. The following C# example demonstrates how to bind this component to an email field.
  • First, we should create the email custom field to the data source for KetticScheduler control
  • Create a custom appointment C# class inheriting from the Appointment class of the KetticScheduler to keep the additional data. The following C# code demonstrates how to achieve this.

public class AppointmentWithEmail : Appointment
{
public AppointmentWithEmail()
: base()
{
}
private string email = string.Empty;
public string Email
{
get
{
return this.email;
}
set
{
if (this.email != value)
{
this.email = value;
this.OnPropertyChanged("Email");
}
}
}
}
  • After adding the custom fields, implement a simple appointment, which inherits from the standard Edit Appointment dialog of the KetticScheduler class, and add input controls and logic to the custom fields. The C# code below shows how to achieve this.

public class CustomAppointmentFactory : IAppointmentFactory
{
#region IAppointmentFactory Members
public IEvent CreateNewAppointment()
{
return new AppointmentWithEmail();
}
#endregion
}
  • And then, assign the custom AppointmentFactory to KetticScheduler in your Windows Forms project with the simple C# code snippet.

this.ketticScheduler1.AppointmentFactory = new CustomAppointmentFactory();

  • Replace the default appointment dialog with a custom DisplayingAppointmentEditDialog event. And create instances of appointment factory for the custom appointment C# class. The C# code below demonstrates how to do that.
  • Add a mapping to the appointment mapping info for the custom field and assign the appointment factory instance to the event provider. The C# code below show the setting.
UI Controlsfor Windows Forms
.NET WinForms UI Overview.NET WinForms UI Features.NET WinForms UI GuideC# WinForms UI DesignVB.NET WinForms UI Design
WinForms UI Controls