ASPxGridBeforeExportEventArgs.ExportTarget Property
In This Article
Gets the export format.
Namespace: DevExpress.Web
Assembly: DevExpress.Web.v24.2.dll
NuGet Package: DevExpress.Web
#Declaration
public ExportTarget ExportTarget { get; }
#Property Value
Type | Description |
---|---|
Export |
One of the enumeration values. |
Available values:
Name | Description |
---|---|
Xls | The document is exported in the XLS format. |
Xlsx | The document is exported in the XLSX format. |
Html | The document is exported in the HTML format. |
Mht | The document is exported in the MHT format. |
The document is exported in the PDF format. |
|
Text | The document is exported in the text format. |
Rtf | The document is exported in the RTF format. |
Csv | The document is exported in the CSV format. |
Image | The document is exported in an image format. |
Docx | The document is exported in the DOCX format. |
#Remarks
Use the ExportTarget property to get the document’s export format.
protected void ASPxGridView1_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