Skip to main content
All docs
V25.1
  • .NET 8.0+
    • The page you are viewing does not exist in the .NET Framework 4.6.2+ platform documentation. This link will take you to the parent topic of the current section.

    GridExportEventArgs.DocumentOptions Property

    Stores PDF export options.

    Namespace: DevExpress.ExpressApp.Blazor.SystemModule

    Assembly: DevExpress.ExpressApp.Blazor.v25.1.dll

    NuGet Package: DevExpress.ExpressApp.Blazor

    Declaration

    public GridDocumentExportOptions DocumentOptions { get; }

    Property Value

    Type Description
    GridDocumentExportOptions

    An instance of the GridDocumentExportOptions class.

    Remarks

    When you export data to PDF, subscribe to the BlazorExportController.CustomizeGridExport event and use the event handler’s DocumentOptions parameter to access GridDocumentExportOptions.

    The following code snippet specifies PDF export options (limits export to selected rows only):

    using DevExpress.Blazor;
    using DevExpress.ExpressApp;
    using DevExpress.ExpressApp.Blazor.SystemModule;
    using DevExpress.ExpressApp.SystemModule;
    // ...
    public partial class CustomizeExportControllerBlazor : ViewController {
        public CustomizeExportControllerBlazor() {
            TargetViewType = ViewType.ListView;
        }
        private BlazorExportController blazorExportController;
        protected override void OnActivated() {
            base.OnActivated();
            blazorExportController = Frame.GetController<BlazorExportController>();
            // Subscribe to CustomizeGridExport event
            blazorExportController.CustomizeGridExport += blazorExportController_CustomizeGridExport;
        }
        void blazorExportController_CustomizeGridExport(object sender, GridExportEventArgs e) {
            // Export only selected rows
            if(e.DocumentOptions != null) {
                e.DocumentOptions.ExportSelectedRowsOnly = true;
            }
        }
        protected override void OnDeactivated() {
            blazorExportController.CustomizeGridExport -= blazorExportController_CustomizeGridExport;
            base.OnDeactivated();
        }
    }
    

    XAF ASP.NET Core Blazor PDF Export of Selected Grid List Rows, DexExpress

    See Also