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
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();
}
}
See Also