Back to Devexpress

DxViewer.TabPanelModel Property

xtrareports-devexpress-dot-blazor-dot-dxviewer-75154492.md

latest2.5 KB
Original Source

DxViewer.TabPanelModel Property

Provides access to the Tab Panel settings.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.Viewer.dll

NuGet Package : DevExpress.Blazor.Viewer

Declaration

csharp
public TabPanelModel TabPanelModel { get; }
vb
Public ReadOnly Property TabPanelModel As TabPanelModel

Property Value

TypeDescription
TabPanelModel

Tab Panel settings.

|

Remarks

To hide tabs in the Report Viewer, use the TabPanelModel property to access the tab collection. Set the tab’s Visible property to false to hide the tab.

The following code sample hides all tabs in the Tab Panel. If all tabs are hidden, the Report Viewer does not display the panel:

razor
@page "/tabpanel/"

@using DevExpress.Blazor.Reporting
@using DevExpress.XtraReports.UI
@using BlazorCustomization.PredefinedReports
@using DevExpress.Blazor.Reporting.Models

<div @ref="viewerComponent" style="width: 100%; height: 1000px;">
    <DxReportViewer @ref="reportViewer"
                    Report="Report" />
</div>

@code {
    DxReportViewer reportViewer;
    XtraReport Report = new TableReport();
    private ElementReference viewerComponent;

    protected override void OnAfterRender(bool firstRender) {
        if(firstRender) {
      reportViewer.TabPanelModel[TabContentKind.Parameters].Visible = false;
      reportViewer.TabPanelModel[TabContentKind.Search].Visible = false;
      reportViewer.TabPanelModel[TabContentKind.ExportOptions].Visible = false;
      reportViewer.TabPanelModel[TabContentKind.DocumentMap].Visible = false; }
    base.OnAfterRender(firstRender);
}

}

See Also

Customize the Report Viewer Tab Panel

DxViewer Class

DxViewer Members

DevExpress.Blazor Namespace