Back to Devexpress

SchedulerRecurrenceFormInfo Class

blazor-devexpress-dot-blazor-e183dc6e.md

latest5.0 KB
Original Source

SchedulerRecurrenceFormInfo Class

Stores information about the Scheduler’s Recurrence form.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
public class SchedulerRecurrenceFormInfo

The following members return SchedulerRecurrenceFormInfo objects:

Remarks

You can use the RecurrenceFormInfo property to access the SchedulerRecurrenceFormInfo object that stores information about the Recurrence form.

Use RepeatEndItems and WeekDayItems properties to customize the Recurrence form.

The following code snippet does the following:

razor
<DxScheduler DataStorage="@DataStorage" 
             AppointmentFormMode="SchedulerAppointmentFormMode.EditForm"
             AppointmentFormShowing="OnAppointmentFormShowing">
    <DxSchedulerWeekView ShowWorkTimeOnly="true" />
</DxScheduler>

@code {
    DxSchedulerDataStorage DataStorage = new DxSchedulerDataStorage() {
            AppointmentsSource = AppointmentCollection.GetAppointments(),
            AppointmentMappings = new DxSchedulerAppointmentMappings() {
                Start = "StartDate",
                End = "EndDate",
                Subject = "Caption",
                LabelId = "Label",
                StatusId = "Status"
            }
        };

    void OnAppointmentFormShowing(SchedulerAppointmentFormEventArgs args) {
        args.FormInfo.RecurrenceFormInfo.RepeatEndItems = new List<SchedulerRecurrenceRange>() {
            SchedulerRecurrenceRange.OccurrenceCount,
            SchedulerRecurrenceRange.EndByDate
        };

        args.FormInfo.RecurrenceFormInfo.WeekDayItems.Remove(SchedulerWeekDays.WeekendDays);
    }
}
csharp
public class Appointment {
    public Appointment() {}
    public int AppointmentType { get; set; }
    public DateTime StartDate { get; set; }
    public DateTime EndDate { get; set; }
    public string Caption { get; set; }
    public string Description { get; set; }
    public string Location { get; set; }
    public int Label { get; set; }
    public int Status { get; set; }
    public bool AllDay { get; set; }
    public string Recurrence { get; set; }
    public bool Accepted { get; set; }
}
csharp
public static partial class AppointmentCollection {
    public static List<Appointment> GetAppointments() {
        DateTime date = DateTime.Today;
        var dataSource = new List<Appointment>() {
                new Appointment {
                    Caption = "Install New Router in Dev Room",
                    StartDate = date + (new TimeSpan(0, 10, 0, 0)),
                    EndDate = date + (new TimeSpan(0, 12, 30, 0)),
                    Label = 6,
                    Status = 4
                },
                new Appointment {
                    Caption = "Upgrade Personal Computers",
                    StartDate = date + (new TimeSpan(0, 13, 0, 0)),
                    EndDate = date + (new TimeSpan(0, 15, 30, 0)),
                    Label = 1,
                    Status = 4
                },
                new Appointment {
                    Caption = "Website Redesign Plan",
                    StartDate = date + (new TimeSpan(1, 9, 30, 0)),
                    EndDate = date + (new TimeSpan(1, 12, 0, 0)),
                    Label = 1,
                    Status = 1,
                    Accepted = true
                },
                new Appointment {
                    Caption = "New Brochures",
                    StartDate = date + (new TimeSpan(1, 13, 30, 0)),
                    EndDate = date + (new TimeSpan(1, 15, 15, 0)),
                    Label = 8,
                    Status = 2,
                    Accepted = true
                },
                // ...
            };
        return dataSource;
    }
}

Inheritance

Object SchedulerRecurrenceFormInfo

See Also

SchedulerRecurrenceFormInfo Members

DevExpress.Blazor Namespace