The requested page is not available for the requested platform. You are viewing the content for Default platform.

FormatConditionDateOccurring 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.v19.1.Core.dll


public class FormatConditionDateOccurring :
Public Class FormatConditionDateOccurring
    Inherits FormatConditionStyleBase


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

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


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()
            Dim dashboard As New Dashboard()
            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

        End Sub
    End Class
End Namespace
See Also