The requested page is not available for the requested platform. You are viewing the content for Default platform.

WebDocumentViewerClientSideEventsBuilder.CustomizeElements(String) Method

Sets the name of the JavaScript function or the entire code that will handle the Web Document Viewer's CustomizeElements client-side event.

Namespace: DevExpress.AspNetCore.Reporting.WebDocumentViewer

Assembly: DevExpress.AspNetCore.Reporting.v19.1.dll


public WebDocumentViewerClientSideEventsBuilder CustomizeElements(
    string callback
Public Function CustomizeElements(
    callback As String
) As WebDocumentViewerClientSideEventsBuilder


Name Type Description
callback String

The name of a JavaScript function or the entire JavaScript function code used to handle the CustomizeElements event.


Type Description

A WebDocumentViewerClientSideEventsBuilder that can be used to further configure the Document Viewer Client Side Events.


The CustomizeElements event enables you to customize the Web Document Viewer's UI elements. When implementing a handling function, use the objects passed as parameters. The first parameter passes the event sender that is the ClientDocumentViewer object. The second one is an object with the following structure.

  • Elements
    A collection of the UI elements included in the Web Document Viewer.

  • GetById
    This method allows you to obtain the required element by its ID using the DevExpress.Report.Preview.PreviewElements object. The following elements are available within this object:

    • RightPanel - corresponds to the panel at the right of the Viewer and containing tabs with the Document Map, Parameters and Export Options.
    • Surface - corresponds to the Viewer's central section displaying the report document.
    • Toolbar - corresponds to the Document Viewer's Toolbar.

The code sample below demonstrates how to use this event to hide the Web Document Viewer's Toolbar.

    var documentViewer = Html.DevExpress().WebDocumentViewer("webDocumentViewer1")
        .ClientSideEvents(configure => { configure.CustomizeElements("customizeElements"); });
See Also