Skip to main content
A newer version of this page is available. .

ASPxClientCustomizeExportOptionsEventArgs Class

Declaration

declare class ASPxClientCustomizeExportOptionsEventArgs extends ASPxClientEventArgs

Remarks

ASPxClientCustomizeExportOptionsEventArgs objects are automatically created, initialized and passed to corresponding event handlers.

Inheritance

ASPxClientEventArgs
ASPxClientCustomizeExportOptionsEventArgs

constructor(options)

Initializes a new instance of the ASPxClientCustomizeExportOptionsEventArgs class with the specified export options.

Declaration

constructor(
    options: any
)

Parameters

Name Type Description
options any

An object that stores export options.

Methods

GetExportOptionsModel(format) Method

Returns the export options model for the specified export format.

Declaration

GetExportOptionsModel(
    format: any
): any

Parameters

Name Type Description
format any

An object that specifies the export format whose model should be returned.

Returns

Type Description
any

An export options model.

Remarks

You can use the obtained model to customize various export options, for instance, change a specific option’s default value.

<script type="text/javascript">
    function customizeExportOptions(s, e) {
        var model = e.GetExportOptionsModel(DevExpress.Reporting.Viewer.ExportFormatID.XLS);
        model.exportHyperlinks(false);
    }
</script>

<dx:ASPxWebDocumentViewer ID="ASPxWebDocumentViewer1" runat="server">
    <ClientSideEvents CustomizeExportOptions="customizeExportOptions"/>
</dx:ASPxWebDocumentViewer>

To pass a required format to this method, use the DevExpress.Reporting.Viewer.ExportFormatID enumeration values: CSV, DOCX, HTML, Image, MHT, PDF, RTF, Text, XLS or XLSX.

HideExportOptionsPanel Method

Hides the entire Export Options panel from the Web Document Viewer.

Declaration

HideExportOptionsPanel(): void

Remarks

The following code snippet demonstrates how to use this method in the ASPxClientWebDocumentViewer.CustomizeExportOptions event handler.

<script type="text/javascript">
    function customizeExportOptions(s, e) {
        e.HideExportOptionsPanel();
    }
</script>

<dx:ASPxWebDocumentViewer ID="ASPxWebDocumentViewer1" runat="server">
    <ClientSideEvents CustomizeExportOptions="customizeExportOptions"/>
</dx:ASPxWebDocumentViewer>

HideFormat(format) Method

Hides the specified export format from the Export To drop-down list and the corresponding category from the Export Options panel.

Declaration

HideFormat(
    format: any
): void

Parameters

Name Type Description
format any

An object that specifies the export format to hide.

Remarks

The following code snippet demonstrates how to use this method in the ASPxClientWebDocumentViewer.CustomizeExportOptions event handler.

<script type="text/javascript">
    function customizeExportOptions(s, e) {
        e.HideFormat(DevExpress.Reporting.Viewer.ExportFormatID.XLS); 
    }
</script>

<dx:ASPxWebDocumentViewer ID="ASPxWebDocumentViewer1" runat="server">
    <ClientSideEvents CustomizeExportOptions="customizeExportOptions"/>
</dx:ASPxWebDocumentViewer>

To pass a required format to this method, use the DevExpress.Reporting.Viewer.ExportFormatID enumeration values: CSV, DOCX, HTML, Image, MHT, PDF, RTF, Text, XLS or XLSX.

HideProperties(format, properties) Method

Hides the specified options for the specified export format from the Export Options panel.

Declaration

HideProperties(
    format: any,
    ... properties: any[]
): void

Parameters

Name Type Description
format any

An object that specifies the export format whose options should be hidden.

properties any[]

An array of properties to hide.

Remarks

To remove all options for a particular export format, specify only the first method parameter.

The following code snippet demonstrates how to use this method in the ASPxClientWebDocumentViewer.CustomizeExportOptions event handler.

<script type="text/javascript">
    function customizeExportOptions(s, e) {
        e.HideProperties(DevExpress.Reporting.Viewer.ExportFormatID.XLS, "ExportMode", "PageRange");
        e.HideProperties(DevExpress.Reporting.Viewer.ExportFormatID.XLSX);
    }
</script>

<dx:ASPxWebDocumentViewer ID="ASPxWebDocumentViewer1" runat="server">
    <ClientSideEvents CustomizeExportOptions="customizeExportOptions"/>
</dx:ASPxWebDocumentViewer>

To pass a required format to this method, use the DevExpress.Reporting.Viewer.ExportFormatID enumeration values: CSV, DOCX, HTML, Image, MHT, PDF, RTF, Text, XLS or XLSX.