Skip to main content
A newer version of this page is available. .

DashboardTabPage Class

A tab page in a TabContainerItem.

Declaration

export class DashboardTabPage extends DashboardItem

Remarks

The DashboardTabPage class is the tabbed page in the TabContainerItem. Tabbed pages are contained in the tabPages collection. Collection indexes determine the visual tab order.

The created tab container always contains one empty tab page (pageDashboardItem1). Create a new tab page using a constructor and add it to the tab container’s tabPages collection to add one more tab page.

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

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();
    tabContainer1.tabPages()[0].name("Difference");

    var page2 = new Model.DashboardTabPage();
    page2.name("Sales");
    tabContainer1.tabPages.push(page2);

    tabContainer1.tabPages()[0].componentName("tabPage1");
    tabContainer1.tabPages()[1].componentName("tabPage2");

    dashboardControl.dashboard().items.push(tabContainer1);
    // ...
    dashboardControl.dashboard().rebuildLayout();
}

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

dashboardItem.parentContainer("tabPage1");

Inheritance

DashboardItem
DashboardTabPage

constructor

Initializes a new instance of the DashboardTabPage class.

Declaration

constructor(
    dashboardItemJSON?: any,
    serializer?: DxDesigner.Analytics.Utils.ModelSerializer
)

Parameters

Name Type Description
dashboardItemJSON any

A JSON object used for a dashboard deserialization. Do not pass this parameter directly.

serializer DxDesigner.Analytics.Utils.ModelSerializer

An object used for a dashboard deserialization. Do not pass this parameter directly.

Properties

interactivityOptions Property

Declaration

interactivityOptions: DashboardItemGroupInteractivityOptions

Property Value

Type
DashboardItemGroupInteractivityOptions

Methods

getInfo Method

For internal use.

Declaration

getInfo(): DxDesigner.Analytics.Utils.ISerializationsInfo

Returns

Type Description
DxDesigner.Analytics.Utils.ISerializationsInfo

 

getUniqueNamePrefix Method

Declaration

getUniqueNamePrefix(): string

Returns

Type
string