Skip to main content
A newer version of this page is available. .

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.v18.2.dll

Declaration

public virtual void LoadFormData(
    Appointment appointment
)

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;
}

The following code snippets (auto-collected from DevExpress Examples) contain references 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.

See Also