DateFilterControl.CustomDisplayText Event
Allows you to specify the date picker text.
Namespace: DevExpress.DashboardWin
Assembly: DevExpress.Dashboard.v24.2.Win.dll
Declaration
Event Data
The CustomDisplayText event's data class is CustomDisplayTextEventArgs. The following properties provide information specific to this event:
Property | Description |
---|---|
DisplayText | Gets or sets an editor’s display text. |
Value | Gets an editor’s current value. |
Remarks
The CustomDisplayText event fires before a date picker caption is displayed and allows you to change it.
Example
This code snippet specifies the date picker button’s caption.
using DevExpress.DashboardWin;
using DevExpress.XtraEditors.Controls;
using System;
// ...
dashboardViewer1.DashboardItemControlCreated += DashboardViewer1_DashboardItemControlCreated;
// ...
private void DashboardViewer1_DashboardItemControlCreated(object sender, DashboardItemControlEventArgs e)
{
if (e.DateFilterControl != null)
{
dateFilter.CustomDisplayText += DateFilter_CustomDisplayText;
}
}
private void DateFilter_CustomDisplayText(object sender, CustomDisplayTextEventArgs e)
{
e.DisplayText = (e.Value is DateTime) ? string.Format("{0:d}", e.Value) : "Click for the Date Picker";
}
See Also