DashboardViewer.BeforeExportDocument Event

Allows you to hide specific dashboard items when printing or exporting the entire dashboard.

Namespace: DevExpress.DashboardWin

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

Declaration

public event BeforeExportDocumentEventHandler BeforeExportDocument
Public Event BeforeExportDocument As BeforeExportDocumentEventHandler

Event Data

The BeforeExportDocument event handler receives an argument of the BeforeExportDocumentEventArgs type.

Remarks

The BeforeExportDocument event allows you to hide specific dashboard items from the printed or exported document using the BeforeExportDocumentEventArgs.HideItem method overloads. See the example below to learn how to do this.

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