The requested page is not available for the requested platform. You are viewing the content for Default platform.

BeforeExportDocumentEventArgs.HideItem(String) Method

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

Namespace: DevExpress.DashboardCommon

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

Declaration

public void HideItem(
    string itemComponentName
)
Public Sub HideItem(
    itemComponentName As String
)

Parameters

Name Type Description
itemComponentName String

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

Examples

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