Skip to main content

BeforeExportDocumentWebEventArgs.HideItem(String) Method

Hides the dashboard item with the specified name in the exported dashboard.

Namespace: DevExpress.DashboardWeb

Assembly: DevExpress.Dashboard.v24.2.Web.dll

NuGet Package: DevExpress.Web.Dashboard.Common

#Declaration

public void HideItem(
    string itemComponentName
)

#Parameters

Name Type Description
itemComponentName String

A String that specifies the component name of the dashboard item to hide.

#Example

The code snippet below shows how to hide specific dashboard items from the exported document using the DashboardConfigurator.BeforeExportDocument event.

using DevExpress.DashboardWeb;
// ...
DashboardConfigurator.Default.BeforeExportDocument += Default_BeforeExportDocument;
// ...
private static void Default_BeforeExportDocument(object sender, BeforeExportDocumentWebEventArgs e) {
    // Hides a dashboard item with the specified name from the exported document.
    e.HideItem("gridDashboardItem1");

    // Hides all filter elements from the exported document.
    e.HideItem((DashboardItem item) => item is FilterElementDashboardItem);
}
See Also