Back to Devexpress

DashboardItem.ParentContainer Property

dashboard-devexpress-dot-dashboardcommon-dot-dashboarditem-d58d27f1.md

latest4.4 KB
Original Source

DashboardItem.ParentContainer Property

Gets or sets the dashboard item container (a group or a tab page) that stores the current item.

Namespace : DevExpress.DashboardCommon

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

NuGet Package : DevExpress.Dashboard.Core

Declaration

csharp
[DefaultValue(null)]
public IDashboardItemContainer ParentContainer { get; set; }
vb
<DefaultValue(Nothing)>
Public Property ParentContainer As IDashboardItemContainer

Property Value

TypeDefaultDescription
IDashboardItemContainernull

A dashboard item group or tab page that stores the current item.

|

Remarks

Use the ParentContainer property to move an item from one group / tab page to another.

The following code moves the item named list1 to a tab page that contains the card1 item.

csharp
dashboard.Items["card1"].ParentContainer = dashboard.Items["list1"].ParentContainer;
vb
dashboard.Items("card1").ParentContainer = dashboard.Items("list1").ParentContainer

The following code snippets (auto-collected from DevExpress Examples) contain references to the ParentContainer 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-window-calculation-example/CS/WindowCalculationExample/TabPageLoadHelper.cs#L53

csharp
{
    if (item.ParentContainer == null)
    {

winforms-dashboard-designer-merge-dashboards-to-tabs/CS/DashboardMerger/DashboardMerger.cs#L86

csharp
foreach(DashboardItem item in ItemsAndGroups) {
    if(item.ParentContainer == null) {
        if(!(item is TabContainerDashboardItem))

winforms-dashboard-window-calculation-example/VB/WindowCalculationExample/TabPageLoadHelper.vb#L74

vb
For Each item As DashboardItem In itemsAndGroups
    If item.ParentContainer Is Nothing Then
        If Not(TypeOf item Is TabContainerDashboardItem) Then

winforms-dashboard-designer-merge-dashboards-to-tabs/VB/DashboardMerger/DashboardMerger.vb#L118

vb
For Each item As DashboardItem In ItemsAndGroups
    If item.ParentContainer Is Nothing Then
        If Not (TypeOf item Is TabContainerDashboardItem) Then

See Also

Dashboard Items

Dashboard Item Group

Tab Container

DashboardItem Class

DashboardItem Members

DevExpress.DashboardCommon Namespace