AppointmentForm.SaveFormData(Appointment) Method
Override this method in a custom form to save custom fields.
Namespace: DevExpress.XtraScheduler.UI
Assembly: DevExpress.XtraScheduler.v18.2.dll
Declaration
Parameters
Name | Type | Description |
---|---|---|
appointment | Appointment | An Appointment object that is the appointment being edited in the form. |
Returns
Type | Description |
---|---|
Boolean | true, if all data are saved successfully; otherwise, false. |
Remarks
When implementing a custom appointment form which descends from AppointmentForm or uses the AppointmentFormController, call the SaveFormData method to save the values of custom appointment fields.
Note
A complete sample project is available at https://github.com/DevExpress-Examples/lesson-7-create-a-custom-appointment-edit-form-t342127
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 snippets (auto-collected from DevExpress Examples) contain references to the SaveFormData(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.