Skip to main content
A newer version of this page is available. .

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
)

Parameters

Name Type Description
match Predicate<DashboardItem>

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

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);
        }
    }

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the HideItem(Predicate<DashboardItem>) method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also