Skip to main content
A newer version of this page is available. .

DashboardDesigner.CustomizeDashboardItemCaption Event

Allows you to customize the dashboard item caption at runtime.

Namespace: DevExpress.DashboardWin

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

Declaration

public event CustomizeDashboardItemCaptionEventHandler CustomizeDashboardItemCaption

Event Data

The CustomizeDashboardItemCaption event's data class is CustomizeDashboardItemCaptionEventArgs. The following properties provide information specific to this event:

Property Description
DashboardItemName Gets the name of the current dashboard item.
FilterText Gets or sets the text displayed in the dashboard title or in the dashboard item caption. The text identifies a single master filter value applied to the dashboard. Inherited from CustomizeDashboardCaptionBaseEventArgs.
Items Provides access to command buttons located in the dashboard title or in the dashboard item’s caption. Inherited from CustomizeDashboardCaptionBaseEventArgs.
Text Gets or sets the text displayed in the dashboard title or the dashboard item caption. Inherited from CustomizeDashboardCaptionBaseEventArgs.
Visible Gets or sets whether the current dashboard item’s caption is shown,

Remarks

This event occurs when the DashboardDesigner loads a dashboard (the DashboardDesigner.Dashboard property changes) or when end-user activities affect the dashboard item caption. Such activities include master filter, drill-down or parameter value change.

Tip

You can change the displayed text, remove existing buttons, add command buttons or command bar items, including drop-down menus.

Example

This code snippet demonstrates how to handle the DashboardDesigner.CustomizeDashboardItemCaption event to display the dashboard parameter’s value in the caption’s area designed to display the filter value.

Note

The complete sample project How to Use Dashboard Items in Tab Pages as Independent Master Filters is available in the DevExpress Examples repository.

using DevExpress.DashboardCommon;
using DevExpress.DashboardCommon.ViewerData;
using DevExpress.DashboardWin;
// ...
        dashboardDesigner1.CustomizeDashboardItemCaption += DashboardDesigner1_CustomizeDashboardItemCaption;
// ...
        private void DashboardDesigner1_CustomizeDashboardItemCaption(object sender, CustomizeDashboardItemCaptionEventArgs e)
        {
            DashboardDesigner dDesigner = sender as DashboardDesigner;
            if (e.DashboardItemName == "chartDashboardItem1" && dDesigner.Parameters.Count > 0)
            {
                e.FilterText = string.Format(" {0}", dDesigner.Parameters[0].SelectedValue);
            }
        }

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the CustomizeDashboardItemCaption 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