DateTimePeriod Class

A date-time period that can be used to select a predefined range in the Range Filter using its context menu.

Namespace: DevExpress.DashboardCommon

Assembly: DevExpress.Dashboard.v18.2.Core.dll

Declaration

public class DateTimePeriod :
    IXmlSerializableElement,
    IDateTimePeriodLimitOwner,
    INameContainer,
    INamedItem,
    ISupportPrefix,
    IDateTimePeriod
Public Class DateTimePeriod
    Implements IXmlSerializableElement,
               IDateTimePeriodLimitOwner,
               INameContainer,
               INamedItem,
               ISupportPrefix,
               IDateTimePeriod

Remarks

The RangeFilterDashboardItem class exposes the RangeFilterDashboardItem.DateTimePeriods property providing access to a collection of predefined date-time periods.

To add the required date-time period in code, create the DateTimePeriod class instance and perform the following steps.

If necessary, you can specify the default selected range for the Range Filter. To do this, assign the DateTimePeriod.Name value to the RangeFilterDashboardItem.DefaultDateTimePeriodName property.

Examples

This example shows how to create a predefined date-time period for the Range Filter dashboard item.

            RangeFilterDashboardItem rangeFilter = new RangeFilterDashboardItem();
            // ...

            FixedDateTimePeriodLimit startDate = new FixedDateTimePeriodLimit(new System.DateTime(2015, 1, 1));
            FlowDateTimePeriodLimit endDate = new FlowDateTimePeriodLimit(DateTimeInterval.Month, -1);
            DateTimePeriod customPeriod = new DateTimePeriod("Custom period", startDate, endDate);
            rangeFilter.DateTimePeriods.Add(customPeriod); 

Inheritance

Object
DateTimePeriod

Implements

DevExpress.DashboardCommon.Native.IXmlSerializableElement
DevExpress.DashboardCommon.Native.IDateTimePeriodLimitOwner
DevExpress.DashboardCommon.Native.INameContainer
DevExpress.DataAccess.Native.INamedItem
DevExpress.DataAccess.Native.ISupportPrefix
DevExpress.DashboardCommon.Native.IDateTimePeriod
See Also