Skip to main content
All docs
V18.2

ASPxClientReportDesigner.PreviewCustomizeElements Event

Enables you to customize UI elements of a Document Viewer built into a Web Report Designer.

Namespace: DevExpress.XtraReports.Web.Scripts

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

Declaration

public event ASPxClientWebDocumentViewerCustomizeElementsEventHandler PreviewCustomizeElements

Event Data

The PreviewCustomizeElements event's data class is ASPxClientCustomizeElementsEventArgs. The following properties provide information specific to this event:

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

The event data class exposes the following methods:

Method Description
GetById(String) Returns UI elements with the specified ID.

Remarks

The event argument provides access to the ASPxClientCustomizeElementsEventArgs.Elements collection containing all available elements of the 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 PreviewCustomizeElements event to hide the Document Viewer Toolbar.

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

<dx:ASPxReportDesigner ID="ASPxReportDesigner1" runat="server">      
    <ClientSideEvents PreviewCustomizeElements="previewCustomizeElements"/> 
</dx:ASPxReportDesigner>
See Also