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

BeforeExportDocumentEventArgs.HideItem(Predicate<DashboardItem>) Method

Hides the dashboard item matching the specified predicate in the exported dashboard.

Namespace: DevExpress.DashboardCommon

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

Declaration

public void HideItem(
    Predicate<DashboardItem> match
)
Public Sub HideItem(
    match As Predicate(Of DashboardItem)
)

Parameters

Name Type Description
match Predicate<DashboardItem>

A System.Predicate that specifies the condition used to determine whether to hide the dashboard item.

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