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

Declaration

public class FormatConditionDateOccurring :
    FormatConditionStyleBase
Public Class FormatConditionDateOccurring
    Inherits FormatConditionStyleBase

Remarks

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.

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

Implements

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