Skip to main content

BeforeExportDocumentEventArgs.HideItem(String) Method

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

Namespace: DevExpress.DashboardCommon

Assembly: DevExpress.Dashboard.v24.1.Core.dll

NuGet Package: DevExpress.Dashboard.Core

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

This example demonstrates how to hide dashboard filter items when a dashboard is exported to PDF and the ExportFilters export option is set to false.

This method can be the used to handle the following events:

using DevExpress.DashboardCommon;
// ...
        dashboardDesigner1.BeforeExportDocument += DashboardDesigner1_BeforeExportDocument;
// ...
    private void DashboardDesigner1_BeforeExportDocument(object sender, BeforeExportDocumentEventArgs e)
    {
        if (e.ExportAction == DashboardExportAction.ExportToPdf &&
            e.PdfExportOptions.ExportFilters == false)
        {
            e.HideItem(item => item is FilterElementDashboardItem ||
            item is DateFilterDashboardItem);
        }
    }
See Also