Back to Devexpress

CustomizeDashboardItemCaptionEventArgs.DashboardItemName Property

dashboard-devexpress-dot-dashboardwin-dot-customizedashboarditemcaptioneventargs.md

latest5.0 KB
Original Source

CustomizeDashboardItemCaptionEventArgs.DashboardItemName Property

Gets the name of the current dashboard item.

Namespace : DevExpress.DashboardWin

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

NuGet Package : DevExpress.Win.Dashboard

Declaration

csharp
public string DashboardItemName { get; }
vb
Public ReadOnly Property DashboardItemName As String

Property Value

TypeDescription
String

A string that is the dashboard item’s name.

|

Remarks

This property’s value is obtained from the DashboardItem.ComponentName property value. You can use it to identify a dashboard item for which the event occurs.

The following code snippets (auto-collected from DevExpress Examples) contain references to the DashboardItemName property.

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.

winforms-dashboard-designer-custom-interactivity-in-tab-pages/CS/CustomInteractivityExample/Form1.cs#L62

csharp
DashboardDesigner dDesigner = sender as DashboardDesigner;
if (e.DashboardItemName == "chartDashboardItem1" && dDesigner.Parameters.Count > 0)
{

winforms-dashboard-customize-title-and-item-captions/CS/CustomizeDashboardItemCaptionExample/ViewerForm1.cs#L82

csharp
DashboardViewer viewer = (DashboardViewer)sender;
var filterValues = viewer.GetCurrentFilterValues(e.DashboardItemName);
if (filterValues != null)

win-designer-pivot-as-master-filter/CS/DesignerSample/Form1.cs#L71

csharp
void OnCustomizeDashboardItemCaption(object sender, CustomizeDashboardItemCaptionEventArgs e) {
    if(e.DashboardItemName == "pivotDashboardItem1") {
        DashboardToolbarItem showDataItem = new DashboardToolbarItem("Clear Master Filter",

winforms-dashboard-designer-custom-interactivity-in-tab-pages/VB/CustomInteractivityExample/Form1.vb#L53

vb
Dim dDesigner As DashboardDesigner = TryCast(sender, DashboardDesigner)
If Equals(e.DashboardItemName, "chartDashboardItem1") AndAlso dDesigner.Parameters.Count > 0 Then
    e.FilterText = String.Format(" {0}", dDesigner.Parameters(0).SelectedValue)

winforms-dashboard-customize-title-and-item-captions/VB/CustomizeDashboardItemCaptionExample/ViewerForm1.vb#L83

vb
Dim viewer As DashboardViewer = DirectCast(sender, DashboardViewer)
Dim filterValues = viewer.GetCurrentFilterValues(e.DashboardItemName)
If filterValues IsNot Nothing Then

win-designer-pivot-as-master-filter/VB/DesignerSample/Form1.vb#L73

vb
Private Sub OnCustomizeDashboardItemCaption(ByVal sender As Object, ByVal e As CustomizeDashboardItemCaptionEventArgs) Handles dashboardDesigner1.CustomizeDashboardItemCaption
    If e.DashboardItemName = "pivotDashboardItem1" Then
        Dim showDataItem As New DashboardToolbarItem("Clear Master Filter", New Action(Of DashboardToolbarItemClickEventArgs)(Function(args) AnonymousMethod1(args)))

See Also

CustomizeDashboardItemCaptionEventArgs Class

CustomizeDashboardItemCaptionEventArgs Members

DevExpress.DashboardWin Namespace