xtrareports-devexpress-dot-aspnetcore-dot-reporting-dot-webdocumentviewer-dot-webdocumentviewerclientsideeventsbuilder-dot-customizeexportoptions-x28-system-dot-string-x29.md
Sets the name of the JavaScript function or the entire code that will handle the Web Document Viewer‘s CustomizeExportOptions client-side event.
Namespace : DevExpress.AspNetCore.Reporting.WebDocumentViewer
Assembly : DevExpress.AspNetCore.Reporting.v25.2.dll
NuGet Package : DevExpress.AspNetCore.Reporting
public WebDocumentViewerClientSideEventsBuilder CustomizeExportOptions(
string callback
)
Public Function CustomizeExportOptions(
callback As String
) As WebDocumentViewerClientSideEventsBuilder
| Name | Type | Description |
|---|---|---|
| callback | String |
The name of a JavaScript function or the JavaScript function code used to handle the CustomizeExportOptions event.
|
| Type | Description |
|---|---|
| WebDocumentViewerClientSideEventsBuilder |
A WebDocumentViewerClientSideEventsBuilder that can be used to configure the Document Viewer’s client-side events.
|
The CustomizeExportOptions event allows you to hide export formats and specify the default export options in the Web Document Viewer.
The following code specifies customizeExportOptions handler function for the CustomizeExportOptions event:
@{
var documentViewer = Html.DevExpress().WebDocumentViewer("webDocumentViewer1")
.Height("1000px")
.ClientSideEvents(configure => {
configure.CustomizeExportOptions("customizeExportOptions");
})
.Bind("TestReport");
}
@documentViewer
The handler function receives two parameters - the first parameter is the client-side DocumentViewer object, the second parameter is the ASPxClientCustomizeExportOptionsEventArgs object with the following methods:
HideExportOptionsPanel - Hides the Export Options panel.
HideFormat - Hides the specified export format from the Export To drop-down list and also hides the related category from the Export Options panel.
HideProperties - Hides the specified options for the export format in the Export Options panel. To remove all options for a particular export format, specify only the first method parameter.
GetExportOptionsModel - Returns the export options model for the specified export format. Use this model to change the option’s default value.
To specify a document format in the method’s parameter, use the ExportFormatID enumeration value.
See Also
WebDocumentViewerClientSideEventsBuilder Class