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

ASPxClientWebDocumentViewer.CustomizeElements Event

Allows you to customize the Web Document Viewer's UI elements.

Namespace: DevExpress.XtraReports.Web.Scripts

Assembly: DevExpress.XtraReports.v18.2.Web.Scripts.dll


public event ASPxClientWebDocumentViewerCustomizeElementsEventHandler CustomizeElements
Public Event CustomizeElements As ASPxClientWebDocumentViewerCustomizeElementsEventHandler

Event Data

The CustomizeElements event handler receives an argument of the ASPxClientCustomizeElementsEventArgs type. The following properties provide information specific to this event.

Property Description
Elements Provides access to the collection of UI elements.


The event argument provides access to the ASPxClientCustomizeElementsEventArgs.Elements collection containing all available elements of the Web Document Viewer.

The ASPxClientCustomizeElementsEventArgs.GetById 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 part displaying the report document.
  • Toolbar - corresponds to the Document Viewer's Toolbar.

The code sample below demonstrates how to use the CustomizeElements event to hide the Document Viewer Toolbar.

<script type="text/javascript" id="script">
    function customizeElements(s, e) {
        var toolbarPart = e.GetById(DevExpress.Report.Preview.PreviewElements.Toolbar);
        var index = e.Elements.indexOf(toolbarPart);
        e.Elements.splice(index, 1);

<dx:ASPxWebDocumentViewer ID="ASPxWebDocumentViewer1" runat="server" ReportSourceId="WebReportDesigner.XtraReport1">
     <ClientSideEvents CustomizeElements="customizeElements"/>
See Also