ASPxClientReportDesigner.PreviewCustomizeExportOptions Event
Allows you to customize available export formats and corresponding export options in a Document Viewer built into a Web Report Designer.
Namespace: DevExpress.XtraReports.Web.Scripts
Assembly: DevExpress.XtraReports.v18.2.Web.Scripts.dll
Declaration
public event ASPxClientWebDocumentViewerCustomizeExportOptionsEventHandler PreviewCustomizeExportOptions
Event Data
The PreviewCustomizeExportOptions event's data class is ASPxClientCustomizeExportOptionsEventArgs.
The event data class exposes the following methods:
Method | Description |
---|---|
GetExportOptionsModel(Object) | Returns the export options model for the specified export format. |
HideExportOptionsPanel() | Hides the entire Export Options panel from the Web Document Viewer. |
HideFormat(Object) | Hides the specified export format from the Export To drop-down list and the corresponding category from the Export Options panel. |
HideProperties(Object, Object[]) | Hides the specified options for the specified export format from the Export Options panel. |
Remarks
The event argument provides the following methods:
HideExportOptionsPanel - Hides the entire Export Options panel.
function customizeExportOptions(s, e) { e.HideExportOptionsPanel(); }
HideFormat - Hides the specified export format from the Export To drop-down list and the corresponding category from the Export Options panel.
function customizeExportOptions(s, e) { e.HideFormat(DevExpress.Report.Preview.ExportFormatID.XLS); }
HideProperties - Hides the specified options for the specified export format from the Export Options panel. To remove all options for a particular export format, specify only the first method parameter.
function customizeExportOptions(s, e) { e.HideProperties(DevExpress.Report.Preview.ExportFormatID.XLS, "ExportMode", "PageRange"); e.HideProperties(DevExpress.Report.Preview.ExportFormatID.XLSX); }
GetExportOptionsModel - Returns the export options model for the specified export format. You can then use this model to customize various export options, for instance, change a specific option’s default value.
function customizeExportOptions(s, e) { var model = e.GetExportOptionsModel(DevExpress.Report.Preview.ExportFormatID.XLS); model.exportHyperlinks(false); }
<dx:ASPxReportDesigner ID="ASPxReportDesigner1" ClientInstanceName="reportDesigner" runat="server">
<ClientSideEvents PreviewCustomizeExportOptions="customizeExportOptions"/>
</dx:ASPxReportDesigner>
To pass a required format to the methods listed above, use the DevExpress.Report.Preview.ExportFormatID enumeration values: CSV, DOCX, HTML, Image, MHT, PDF, RTF, Text, XLS or XLSX.