ReportDesignerPreviewClientSideEventsBuilder.DocumentReady(String) Method
Sets the name of the JavaScript function or the entire code that will handle the DocumentReady client-side event of the Web Report Designer‘s Preview.
Namespace: DevExpress.AspNetCore.Reporting.ReportDesigner
Assembly: DevExpress.AspNetCore.Reporting.v24.2.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 DocumentReady event. |
Returns
Type | Description |
---|---|
ReportDesignerPreviewClientSideEventsBuilder | A ReportDesignerPreviewClientSideEventsBuilder that can be used to further configure the Report Designer Preview Client Side Events. |
Remarks
The DocumentReady event enables you to respond to loading a report to the Document Viewer built into the Web Report Designer. When implementing a handling function, use the objects passed as parameters. The first parameter passes the event sender that is the ClientReportDesigner object. The second one is an object with the following structure.
ReportId
The report ID.DocumentId
The ID of the document that is ready to be shown in the Web Report Designer’ Document Viewer.PageCount
The total number of pages in a report document.
The code sample below demonstrates how to use this event to navigate through pages of a ready document.
@{
var designer = Html.DevExpress().ReportDesigner("reportDesigner1").Height("1000px")
.Bind(Model.Report)
.DataSources(configureDS => { foreach (var ds in Model.DataSources) { configureDS.Add(ds.Key, ds.Value); } })
.ClientSideEvents(configure => { configure.Preview(configure => { configure.DocumentReady("previewDocumentReady"); }); } );
}
@designer