Skip to main content

Tab Container

  • 5 minutes to read

Like the Dashboard Item Group, the Tab Container dashboard item (the TabContainerItem class) allows you to combine elements within a dashboard. The main Tab Container’s purpose is to split the dashboard layout into several pages. For example, you can place common filter elements on a separate tab page to display only data dashboard items.


Create a Tab Container in UI

To create a tab container, use the Tab Container button (the Insert Tab Container icon) in the Toolbox. The created tab container always contains one empty tab page (Page 1).


Click the Add page button (the wdd-tab-container-add-page-button icon) to add a new page to the empty tab container.

A tab page can contain dashboard items and dashboard item groups. You can add them to a tab page using one of the following ways:

  • Create a new item using the buttons inside the empty tab page.
  • Drag a new item from the Toolbox and drop it to the tab page.
  • Use drag-and-drop to move existing items to the tab page.


Tab containers cannot be added to another tab container.

Use the Options item menu to configure the tab page settings in the UI (for example, add a new tab page, change the order of tab pages, manage interactivity settings, or delete the tab page). An active tab page is highlighted with bold. Click the Edit button (the web-tab-container-options-edit icon) to open options of the selected tab page.


In code, use the DashboardTabPage members to customize a tab page.

Display Item as Page

The tab caption is above the caption of the content element on the page. If a tab page contains a single element, the Display Item as Page feature is activated. It merges the dashboard item with a tab page and displays a single caption, as illustrated below:


To disable the Display Item as Page feature, enable the Display Item as Page option in the tab page’s Options menu:


In code, use the DashboardTabPage.showItemAsTabPage property.


The tab page allows you to manage the interaction between dashboard items inside and outside the page.

The image below shows a tab page’s default interactivity settings:

web dashboard-tabContainer-interactivity

The Master Filter button controls whether the current tab page allows you to filter dashboard items outside the page using master filter items contained within the page. By default, this option is enabled: master filter items in the page can filter any dashboard items.

The Ignore Master Filters button allows you to isolate dashboard items contained within the tab page from external master filter items. By default, this option is disabled: external master filter items can filter the dashboard items contained within the tab page.

Use the DashboardTabPage.interactivityOptions property to access the dashboard item page’s interactivity settings in code. This property returns the DashboardItemGroupInteractivityOptions object that exposes the following members:

Gets or sets whether external dashboard items can be filtered using master filter items contained in the current DashboardItemGroup / TabContainerDashboardItem.
Gets or sets whether the current dashboard item ignores filtering applied by master filters.

Create a Tab Container in Code

Follow the steps below to create a tab container in code:

  1. Create a TabContainerItem class instance.
  2. A tab container cannot be empty and always contains one empty tab page (a DashboardTabPage class instance). Create one more DashboardTabPage instance and add it to the TabContainerItem.tabPages collection to add an additional tab page.
  3. Add the created tab container to the Dashboard.items collection.
  4. Rebuild the current dashboard’s layout using the Dashboard.rebuildLayout property.

Use the SelectedTabPageChanged event to indicate whether the selected tab page is changed.

The following example shows how to add the tab container with two tab pages (tabPage1 and tabPage2).

After you add the created dashboard item to the Dashboard.items collection, call the Dashboard.rebuildLayout method to rebuild the dashboard layout and display changes.

// Use the line below for a modular approach:
// import * as Model from 'devexpress-dashboard/model'
// Use the line below for an approach with global namespaces:
// var Model = DevExpress.Dashboard.Model;

public createTabs() { 
    var tabContainer1 = new Model.TabContainerItem();

    var page2 = new Model.DashboardTabPage();"Sales");


    // ...

To add a dashboard item to the tab container, assign the tab page’s componentName to the dashboard item’s parentContainer property.


API Members

Dashboard Model

A tab container used to arrange dashboard items and groups within a dashboard.
A tab page in a TabContainerItem.
A layout tab container used to arrange layout tab pages within a dashboard.
A layout tab page used to arrange layout items and groups.
Provides access to a collection of dashboard items.
Provides access to the collection of tab pages stored in the tab container.
Specifies the dashboard item container (a group or a tab page) that stores the current item.

DashboardControl Members

Gets the selected page in the specified tab container.
Selects the specified tab page by its component name.
Gets the index of the selected page in the specified tab container.
Selects the specified tab page by its index in the specified tab container.