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")
        .ClientSideEvents(configure => {

The Document Viewer Client-Side events allow you to perform the following actions:

  • Customize Document Viewer Elements and Actions

    Event Description
    CustomizeElements Allows you to customize the Web Document Viewer's UI elements.
    CustomizeMenuActions Enables you to customize the Web Document Viewer's toolbar.
    CustomizeExportOptions Allows you to customize the Web Document Viewer's available export formats and corresponding export options.
  • Customize Parameter Editors

    Event Description
    CustomizeParameterEditors Enables you to provide custom report parameters editors.
    CustomizeParameterLookUpSource Allows you to customize look-up report parameter values.
  • Respond to Parameter Reset and Submitting

    Event Description
    ParametersReset Occurs after report parameter values are reset to their default values.
    ParametersSubmitted Occurs after report parameter values are submitted.
  • Respond to Document Loading

    Event Description
    DocumentReady Occurs after the Web Document Viewer loads a report document.
  • Manage Interactivity

    Event Description
    PreviewClick Occurs when a report document is clicked.
    EditingFieldChanged Occurs each time an editing field's value changes.
  • Localize the Document Viewer

    Event Description
    CustomizeLocalization Enables you to substitute the Web Document Viewer's localization strings with custom ones.
  • Respond to Server-Side Errors

    Event Description
    OnServerError Occurs on the client each time a server-side error raises.
  • Initialize the Document Viewer

    Event Description
    BeforeRender Occurs before the Web Document Viewer UI is initialized.