WebDocumentViewerClientSideEventsBuilder.CustomizeMenuActions(String) Method
Sets the name of the JavaScript function or the entire code that will handle the CustomizeMenuActions client-side event of the Web Document Viewer.
Namespace: DevExpress.AspNetCore.Reporting.WebDocumentViewer
Assembly: DevExpress.AspNetCore.Reporting.v19.1.dll
NuGet Package: DevExpress.AspNetCore.Reporting
Declaration
Parameters
Name | Type | Description |
---|---|---|
callback | String | The name of a JavaScript function or the entire JavaScript function code used to handle the CustomizeMenuActions event. |
Returns
Type | Description |
---|---|
WebDocumentViewerClientSideEventsBuilder | A WebDocumentViewerClientSideEventsBuilder that can be used to further configure the Document Viewer Client Side Events. |
Remarks
The CustomizeMenuActions event enables you to customize the menu actions of the Web Document Viewer. 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.
Actions
A collection of Actions available in the Web Document Viewer’s toolbar and menu.GetById
This method allows you to obtain the required Action by its ID (ActionId value).
The following example demonstrates how to hide the existing Highlight Editing Fields toolbar command and add a new Run Slide Show command that navigates through document pages.
@{
var documentViewer = Html.DevExpress().WebDocumentViewer("DocumentViewer")
.Height("1000px")
.Bind("Report")
.ClientSideEvents(configure => { configure.CustomizeMenuActions("customizeMenuAction"); }); ;
}
@documentViewer
See Customize the Document Viewer Toolbar for more information.