DashboardDesigner.CustomizeDashboardItemCaption Event

Allows you to customize the dashboard item caption at runtime.

Namespace: DevExpress.DashboardWin

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


public event CustomizeDashboardItemCaptionEventHandler CustomizeDashboardItemCaption
Public Event CustomizeDashboardItemCaption As CustomizeDashboardItemCaptionEventHandler

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 title that 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,

This event is raised when the dashboard is loaded (the DashboardViewer.Dashboard property is changed) or when end-user activities affect the dashboard item caption. Such activities include applying master filter, performing drill-down or changing the parameter value.

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



The complete sample project WinForms Dashboard - How to delay data load until all filters are set is available in the DevExpress Examples repository.

using DevExpress.DashboardWin;
using System;
using System.Linq;

namespace CustomShowDataExample
    public partial class DesignerForm1 : DevExpress.XtraBars.Ribbon.RibbonForm
        public DesignerForm1()
            dashboardDesigner.CustomizeDashboardTitle += DashboardDesigner_CustomizeDashboardTitle;

        #region #CustomizeDashboardTitle
        private void DashboardDesigner_CustomizeDashboardTitle(object sender, DevExpress.DashboardWin.CustomizeDashboardTitleEventArgs e)
            DevExpress.Data.IParameter showDataParameter = dashboardDesigner.Parameters.FirstOrDefault(p => p.Name == "ShowData");
            if (showDataParameter != null)
                bool showData = (bool)showDataParameter.Value;
                DashboardToolbarItem showDataItem = new DashboardToolbarItem(showData, "Select states in the State list box and click this button to display data",
                    new Action<DashboardToolbarItemClickEventArgs>((args) => {
                        showDataParameter.Value = !showData;
                showDataItem.Caption = "Show Data";
                showDataItem.SvgImage = svgImageCollection1[0];
                e.Items.Insert(0, showDataItem);
        #endregion #CustomizeDashboardTitle
See Also