Skip to main content

DateFilterControl.CustomDisplayText Event

Allows you to specify the date picker text.

Namespace: DevExpress.DashboardWin

Assembly: DevExpress.Dashboard.v22.1.Win.dll

Declaration

public event EventHandler<CustomDisplayTextEventArgs> CustomDisplayText

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.

View Example: How to Customize the Date Filter Dashboard Item

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";
    }

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the CustomDisplayText event.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also