Appointment Recurrence Form - Overview

  • 2 min to read

The AppointmentRecurrenceForm is a Recurrence form that can be used as a standalone form. This form is useful in applications which do not require complete Scheduler functionality. The Recurrence form allows the end-user to specify a recurrence rule and pass the resulting RecurrenceInfo instance to the application. For more information refer to the Recurrence Dialog as a Standalone Form document.

Implementation Details

The AppointmentRecurrenceForm is realized by the AppointmentRecurrenceFormExtension class. Its instance can be accessed via the ExtensionsFactory.AppointmentRecurrenceForm helper method, which is used to add an AppointmentRecurrenceForm extension to a view. This method's parameter provides access to the AppointmentRecurrenceForm's settings implemented by the AppointmentRecurrenceFormSettings class, which allows you to fully customize the extension.

The AppointmentRecurrenceForm does not have a client counterpart.

Declaration

The AppointmentRecurrenceForm can be added to a view in the following manner.

View Code:


@Html.DevExpress().AppointmentRecurrenceForm(
    settings => {
        settings.Name = "RecurrenceControl";
        settings.IsRecurring = Model != null;
}).Bind(Model).GetHtml()

When all modifications are complete, the controller gets the result using the AppointmentRecurrenceFormExtension.GetValue method.

Controller Code:


public ActionResult RecurrenceFormInfo() {
    Appointment pattern = new Appointment(AppointmentType.Pattern,
        new DateTime(2012, 10, 20, 3, 0, 0), new DateTime(2012, 10, 20, 4, 0, 0));
    RecurrenceInfo recurrenceInfo = AppointmentRecurrenceFormExtension.GetValue("RecurrenceControl", pattern);
    return View("RecurrenceFormInfo", (object)recurrenceInfo.ToXml());
}
See Also