RangeFilterPredefinedDateTimePeriodsEventArgs.Periods Property

Provides access to a collection of predefined periods displayed in the Edit Periods dialog.

Namespace: DevExpress.DashboardCommon

Assembly: DevExpress.Dashboard.v20.1.Core.dll


public IList<DateTimePeriod> Periods { get; }
Public ReadOnly Property Periods As IList(Of DateTimePeriod)

Property Value

Type Description

A collection of DateTimePeriod objects that specify predefined date-time periods.


This example shows how to use the DashboardDesigner.RangeFilterPredefinedDateTimePeriods event to customize a default list of predefined periods from the Edit Periods dialog. Note that this list is customized when filtering by year is applied in the dialog.

    using DevExpress.DashboardCommon;        
    private void dashboardDesigner_RangeFilterPredefinedDateTimePeriods(object sender, RangeFilterPredefinedDateTimePeriodsEventArgs e) {
            if (e.ItemComponentName == "range" && e.FilterType == DateTimePeriodFilterType.Year) {
                // Creates a new 'Last 4 Years' period.
                FlowDateTimePeriodLimit startDate = new FlowDateTimePeriodLimit(DateTimeInterval.Year, -4);
                FlowDateTimePeriodLimit endDate = new FlowDateTimePeriodLimit(DateTimeInterval.Year, 0);
                DateTimePeriod period = new DateTimePeriod("Last 4 Years", startDate, endDate);
                e.Periods.Insert(3, period);

                // Removes the default 'Last Year' period.
                period = e.Periods.FirstOrDefault(p => p.Name == DashboardWinLocalizer.GetString(DashboardWinStringId.PeriodLastYear));
See Also