BeforeExportDocumentEventArgs.HideItem(Predicate<DashboardItem>) Method

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

Namespace: DevExpress.DashboardCommon

Assembly: DevExpress.Dashboard.v18.2.Core.dll

Declaration

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

Parameters

Type Name Description
Predicate<DashboardItem> match

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

Examples

The method in the code snippet below is the Dashboard control's BeforeExportDocument event handler demonstrating how to hide dashboard items, groups and tab pages in the printed or exported document.

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

using DevExpress.DashboardCommon;
// ...
    private void dashboardControl_BeforeExportDocument(object sender, DevExpress.DashboardCommon.BeforeExportDocumentEventArgs e) {
        // Hide a dashboard item with the specified name from the printed/exported document.
        e.HideItem("gridDashboardItem1");

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