dashboard-devexpress-dot-dashboardcommon-dot-dashboarditem.md
Gets or sets the component name of the dashboard item.
Namespace : DevExpress.DashboardCommon
Assembly : DevExpress.Dashboard.v25.2.Core.dll
NuGet Package : DevExpress.Dashboard.Core
[DefaultValue(null)]
public string ComponentName { get; set; }
<DefaultValue(Nothing)>
Public Property ComponentName As String
| Type | Default | Description |
|---|---|---|
| String | null |
A String that specifies the component name of the dashboard item.
|
The component name of the dashboard item is used in code to identify the dashboard item object. Use this name when calling the DashboardViewer.SetMasterFilter or DashboardViewer.PerformDrillDown methods.
The Name is displayed in the dashboard item caption. It does not have to be unique.
The ComponentName identifies a dashboard item in a dashboard container. It has to be unique in the dashboard. You can use only letters (A-Z, a-z), numbers (0-9), and the underscore symbol (_) to set a component name. The component name should start with a letter.
Tip
Set the DashboardDesigner.AllowEditComponentName property to true to allow changing the item’s ComponentName in the dashboard designer, as shown in the picture below.
The following code snippets (auto-collected from DevExpress Examples) contain references to the ComponentName 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-merge-dashboards-to-tabs/CS/DashboardMerger/ItemsMerger.cs#L32
DashboardItemGroup groupCopy = CreateGroupCopy(originalGroup);
if(toGroups.Any(g => g.ComponentName == originalGroup.ComponentName)) {
if(ResolveGroupNamesConflict(groupCopy, originalGroup.ComponentName, toGroups, dashboardMerger.GroupNamesMap))
string status = settings.MultiPaneEnabled == true ? "enabled" : "disabled";
CustomPropertyHistoryItem historyItem = new CustomPropertyHistoryItem(dashboardItem, customPropertyName, settings.ToJson(), $"Autogenerate Panes for {dashboardItem.ComponentName} is {status}");
dashboardDesigner.AddToHistory(historyItem);
winforms-dashboard-window-calculation-example/CS/WindowCalculationExample/TabPageLoadHelper.cs#L28
targetDashboard.Items.Add(destinationParentContainer);
TabContainerName = destinationParentContainer.ComponentName;
foreach (var item in viewer.Dashboard.Items) {
if (viewer.CanSetMasterFilter(item.ComponentName)) {
var filterValues = viewer.GetCurrentFilterValues(item.ComponentName);
dashboard-constant-lines/CS/ConstantLineExtension.WPF/ConstantLinesConverter.cs#L46
{
MultiDimensionalData data = provider.GetItemData(chartItem.ComponentName);
MeasureDescriptor measure = data.GetMeasures().FirstOrDefault(m => m.ID == customConstantLine.MeasureId);
winforms-dashboard-designer-merge-dashboards-to-tabs/VB/DashboardMerger/ItemsMerger.vb#L36
Dim groupCopy As DashboardItemGroup = CreateGroupCopy(originalGroup)
If toGroups.Any(Function(g) g.ComponentName = originalGroup.ComponentName) Then
If ResolveGroupNamesConflict(groupCopy, originalGroup.ComponentName, toGroups, dashboardMerger.GroupNamesMap) Then
Dim status As String = If(settings.MultiPaneEnabled = True, "enabled", "disabled")
Dim historyItem As New CustomPropertyHistoryItem(dashboardItem, customPropertyName, settings.ToJson(), $"Autogenerate Panes for {dashboardItem.ComponentName} is {status}")
dashboardDesigner.AddToHistory(historyItem)
winforms-dashboard-window-calculation-example/VB/WindowCalculationExample/TabPageLoadHelper.vb#L57
targetDashboard.Items.Add(destinationParentContainer)
TabContainerName = destinationParentContainer.ComponentName
Dim tabPage As DashboardTabPage = CopyDashboardToTabPage(targetDashboard, originalDashboard)
For Each item In viewer.Dashboard.Items
If viewer.CanSetMasterFilter(item.ComponentName) Then
Dim filterValues = viewer.GetCurrentFilterValues(item.ComponentName)
Dim increment As Integer = If(value = NextPrevValue.Next, 1, -1)
Dim tabContainerName As String = tabContainer.ComponentName
Dim selectedIndex As Integer = dashboardViewer.GetSelectedTabPageIndex(tabContainerName)
See Also