FormatConditionDateOccuring Class

A format condition used to apply formatting to date-time values concerning a specific date and/or date interval relative to today.

Namespace: DevExpress.DashboardCommon

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

Declaration

public class FormatConditionDateOccuring :
    FormatConditionStyleBase
Public Class FormatConditionDateOccuring
    Inherits FormatConditionStyleBase
    Implements

Remarks

To create a format condition to apply formatting to the required date-time values, do the following.

Assign the resulting FormatConditionDateOccuring object to the DashboardItemFormatRule.Condition property.

Examples

The Date Occurring format condition (FormatConditionDateOccuring) allows you to apply formatting to date-time values of a specific date and/or date interval relative to today.

This example demonstrates how to apply conditional formatting to Grid cells whose values fall into one of the predefined intervals.

Imports DevExpress.DashboardCommon
Imports DevExpress.XtraEditors

Namespace Grid_DateOccurring
    Partial Public Class Form1
        Inherits DevExpress.XtraEditors.XtraForm

        Public Sub New()
            InitializeComponent()
            Dim dashboard As New Dashboard()
            dashboard.LoadFromXml("..\..\Data\Dashboard.xml")
            dashboardViewer1.Dashboard = dashboard
            Dim grid As GridDashboardItem =
                CType(dashboard.Items("gridDashboardItem1"), GridDashboardItem)
            Dim [date] As GridDimensionColumn = CType(grid.Columns(0), GridDimensionColumn)

            Dim dateOccuringRule As New GridItemFormatRule([date])
            Dim dateOccuringCondition As New FormatConditionDateOccuring()
            dateOccuringCondition.DateType = FilterDateType.MonthAgo1 Or FilterDateType.MonthAgo2
            dateOccuringCondition.StyleSettings =
                New AppearanceSettings(FormatConditionAppearanceType.PaleOrange)
            dateOccuringRule.Condition = dateOccuringCondition
            dateOccuringRule.ApplyToRow = True

            grid.FormatRules.Add(dateOccuringRule)
        End Sub
    End Class
End Namespace

Inheritance

Implements

DevExpress.DashboardCommon.Native.IAggregationInfo
DevExpress.DashboardCommon.Native.IFormatCondition
DevExpress.DashboardCommon.Native.IXmlSerializableElement
DevExpress.DashboardCommon.Native.IFormatStyleSettingsOwner
DevExpress.DashboardCommon.Native.IMinMaxInfo
See Also