Document Viewer Client-Side Events in ASP.NET Core Application
- 2 minutes to read
The Web Document Viewer control provides an advanced client-side API in addition to the comprehensive server-side object model. This enables web applications based on this control to function more efficiently by combining server-side and client-side processing.
The WebDocumentViewerClientSideEventsBuilder class exposes methods that allow you to pass client-side events’ handlers. To access this class instance, use the WebDocumentViewerBuilder.ClientSideEvents method.
@{
var documentViewer = Html.DevExpress().WebDocumentViewer("webDocumentViewer1")
.Height("1000px")
.ClientSideEvents(configure => {
configure.CustomizeMenuActions("customizeMenuAction");
})
.Bind("TestReport");
}
@documentViewer
The Document Viewer Client-Side events allow you to perform the following actions:
Customize Document Viewer Elements and Actions
Event Description Customize Elements Allows you to customize the Web Document Viewer’s UI elements. Customize Menu Actions Enables you to customize the Web Document Viewer’s toolbar. Customize Export Options Allows you to customize the Web Document Viewer’s available export formats and corresponding export options. Customize Parameter Editors
Event Description Customize Parameter Editors Enables you to provide custom report parameters editors. Customize Parameter Look Up Source Allows you to customize look-up report parameter values. Manage Report Parameters
Event Description Parameters Initialized Allows you to get the client-side parameter values when they are initialized and modify them. Respond to Parameter Reset and Submitting
Event Description Parameters Reset Occurs after report parameter values are reset to their default values. Parameters Submitted Occurs after report parameter values are submitted. Respond to Document Loading
Event Description Document Ready Occurs after the Web Document Viewer loads a report document. Manage Interactivity
Event Description Preview Click Occurs when a report document is clicked. Editing Field Changed Occurs each time an editing field’s value changes. Localize the Document Viewer
Event Description Customize Localization Enables you to substitute the Web Document Viewer’s localization strings with custom ones. Respond to Server-Side Errors
Event Description On Server Error Occurs on the client each time a server-side error raises. Initialize the Document Viewer
Event Description Before Render Occurs before the Web Document Viewer UI is initialized.