Skip to main content
A newer version of this page is available. .

Document Viewer's Client-Side API

  • 5 minutes to read

The ASPxWebDocumentViewer control (WebDocumentViewerExtension in ASP.NET MVC) 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 using a combination of server-side and client-side processing.

Note

Although the entire client API is available on the client side, we recommend that you only use the documented public client-side API for any custom client functionality. The undocumented API can be changed or removed without any notifications, and applications using this API can stop working correctly after upgrading to a newer reporting controls version.

The DevExpress.XtraReports.Web.Scripts namespace contains classes that implement the web reporting controls’ client-side functionality.

Refer to Client-Side Functionality Overview for more information on the DevExpress client-side model implementation, and the Client-Side Events topic to learn how to handle client-side events.

The client-side API of the Web Document Viewer allows you to perform the following actions:

Available Enumerators’ Values

In specific client-side events’ handlers, you can obtain the required elements by their IDs using the dedicated constants.

Use the following values to access the existing toolbar commands in the ASPxClientWebDocumentViewer.CustomizeMenuActions event:

Value Description
FirstPage The First Page toolbar button.
PrevPage The Previous Page toolbar button.
Pagination The drop-down list that navigates to the selected page.
NextPage The Next Page toolbar button.
LastPage The Last Page toolbar button.
MultipageToggle The Toggle Multipage Mode toolbar button.
HightlightEditingFields The Highlight Editing Fields toolbar button.
ZoomOut The Zoom Out toolbar button.
ZoomSelector The drop-down list with available zoom factors.
ZoomIn The Zoom In toolbar button.
Print The Print toolbar button.
PrintPage The Print Page toolbar button.
ExportTo The Export To toolbar button.
Search The Search toolbar button.

In the ASPxClientWebDocumentViewer.CustomizeElements event handler, use the DevExpress.Report.Preview.PreviewElements object’s values listed below:

Value Description
RightPanel The panel at the right of the Viewer and containing tabs with the Document Map, Parameters and Export Options.
Surface The Viewer’s central part displaying the report document.
Toolbar The Document Viewer’s Toolbar.