AppointmentForm.LoadFormData(Appointment) Method
Override this method in a custom form to load custom fields to form editors.
Namespace: DevExpress.XtraScheduler.UI
Assembly: DevExpress.XtraScheduler.v24.2.dll
Declaration
Parameters
Name | Type | Description |
---|---|---|
appointment | Appointment | An Appointment object that is the appointment being edited in the form. |
Remarks
When implementing a custom appointment form which descends from AppointmentForm or uses the AppointmentFormController, call the LoadFormData method to load the values of custom appointment fields.
string _contacts;
public virtual void LoadFormData(Appointment appointment) {
if (appointment.CustomFields["Contacts"] == null)
mxContacts.Text = "";
else {
_contacts = appointment.CustomFields["Contacts"].ToString();
mxContacts.Text = _contacts;
}
}
public virtual bool SaveFormData(Appointment appointment) {
appointment.CustomFields["Contacts"] = mxContacts.Text;
return true;
}
public virtual bool IsAppointmentChanged(Appointment appointment) {
if (_contacts == appointment.CustomFields["Contacts"].ToString())
return false;
else
return true;
}
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the LoadFormData(Appointment) method.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.