Back to Devexpress

RecurrenceInfo.GetDescription(Appointment, DayOfWeek) Method

corelibraries-devexpress-dot-xtrascheduler-dot-recurrenceinfo-dot-getdescription-x28-devexpress-dot-xtrascheduler-dot-appointment-system-dot-dayofweek-x29.md

latest4.4 KB
Original Source

RecurrenceInfo.GetDescription(Appointment, DayOfWeek) Method

Returns a human readable description of the recurrence pattern for the specified appointment.

Namespace : DevExpress.XtraScheduler

Assembly : DevExpress.XtraScheduler.v25.2.Core.dll

NuGet Package : DevExpress.Scheduler.Core

Declaration

csharp
public static string GetDescription(
    Appointment apt,
    DayOfWeek firstDayOfWeek
)
vb
Public Shared Function GetDescription(
    apt As Appointment,
    firstDayOfWeek As DayOfWeek
) As String

Parameters

NameTypeDescription
aptAppointment

An Appointment object that specifies the appointment whose recurrence pattern is to be converted into a human readable description.

| | firstDayOfWeek | DayOfWeek |

A DayOfWeek enumeration value which specifies the day of the week that is considered to be the first when calculating the recurrence pattern for the appointment. The current setting for the first day of the week can be obtained via the SchedulerControl.FirstDayOfWeek property.

|

Returns

TypeDescription
String

A String, which is a human readable description of the appointment’s recurrence pattern. Localizable.

|

Remarks

The GetDescription method uses SchedulerStringId values for abbreviations and format strings. Use the SchedulerLocalizer class to localize the string returned by the GetDescription method.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the GetDescription(Appointment, DayOfWeek) 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.

report-server-how-to-manage-scheduled-jobs-from-a-windows-forms-application/CS/ScheduledTasksAPIClientDemo/SchedulerJobViewerForm.cs#L72

csharp
var infos = new List<Info>();
infos.Add(new Info { Name = "Description", Value = RecurrenceInfo.GetDescription(appointment, culture.DateTimeFormat.FirstDayOfWeek) });
infos.Add(new Info { Name = "Next start", Value = GetNextDateDisplayText(appointment) });

report-server-how-to-manage-scheduled-jobs-from-a-windows-forms-application/VB/ScheduledTasksAPIClientDemo/SchedulerJobViewerForm.vb#L74

vb
.Name = "Description", _
    .Value = RecurrenceInfo.GetDescription(appointment, culture.DateTimeFormat.FirstDayOfWeek) _
})

See Also

Appointments

RecurrenceInfo Class

RecurrenceInfo Members

DevExpress.XtraScheduler Namespace