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

DashboardDesigner.CustomizeDashboardItemCaption Event

Allows you to customize the dashboard item caption at runtime.

Namespace: DevExpress.DashboardWin

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

Declaration

public event CustomizeDashboardItemCaptionEventHandler CustomizeDashboardItemCaption
Public Event CustomizeDashboardItemCaption As CustomizeDashboardItemCaptionEventHandler

Event Data

The CustomizeDashboardItemCaption event handler receives an argument of the CustomizeDashboardItemCaptionEventArgs type. 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.
Items Provides access to command buttons located in the dashboard title or in the dashboard item's caption.
Text Gets or sets the text displayed in the dashboard title or the dashboard item caption.
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.

Examples

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);
            }
        }
See Also