ASPxGridExporterBase.BeforeExport Event
In This Article
Occurs before the grid content is exported.
Namespace: DevExpress.Web
Assembly: DevExpress.Web.v24.2.dll
NuGet Package: DevExpress.Web
#Declaration
public event ASPxGridBeforeExportEventHandler BeforeExport
#Event Data
The BeforeExport event's data class is ASPxGridBeforeExportEventArgs. The following properties provide information specific to this event:
Property | Description |
---|---|
Export |
Specifies the export parameters. |
Export |
Gets the export format. |
#Remarks
The BeforeExport event enables you to perform custom actions before the grid content is exported.
protected void ASPxGridViewExporter1_BeforeExport(object sender, DevExpress.Web.ASPxGridBeforeExportEventArgs e) {
switch(e.ExportTarget) {
case ExportTarget.Pdf:
var opts = e.ExportOptions as PdfExportOptions;
opts.PasswordSecurityOptions.PermissionsPassword = "MyCustomPassword";
break;
...
}
}
#Concept
See Also