Client Events Overview
This article explains how to attach client event handlers to an MVC ReportViewer instance.
To attach a client event handler you have to set the appropriate ClientEvents
widget method as shown below:
<script>
function onRenderingBegin() {
console.log("rendering begin!");
}
function onRenderingEnd() {
console.log("rendering end!");
}
</script>
@(Html.TelerikReporting().ReportViewer()
.ClientEvents(
events => events
.RenderingBegin("onRenderingBegin")
.RenderingEnd("onRenderingEnd")
)
)
The following table list the available client events:
Event | Description |
---|---|
RenderingBegin | Occurs before rendering the report. For the underlying JS methods see RenderingBegin |
RenderingEnd | Occurs after rendering the report. For the underlying JS methods see RenderingEnd |
PrintBegin | Occurs before printing the report. For the underlying JS methods see PrintBegin |
PrintEnd | Occurs after printing the report. For the underlying JS methods see PrintEnd |
ExportBegin | Occurs before exporting the report. For the underlying JS methods see ExportBegin |
ExportEnd | Occurs after exporting the report. For the underlying JS methods see ExportEnd |
UpdateUi | Occurs on each UI update of the viewer. For the underlying JS methods see UpdateUi |
Error | Error occurred. For the underlying JS methods see Error |
PageReady | Occurs after a page of the report is ready. For the underlying JS methods see PageReady |
Ready | Report viewer is ready. For the underlying JS methods see Ready |
InteractiveActionExecuting | Occurs before an interactive action is executed, providing the ability to cancel the execution. For the underlying JS methods see InteractiveActionExecuting |
InteractiveActionEnter | Occurs when the mouse cursor enters the area of an interactive action. For the underlying JS methods see InteractiveActionEnter |
InteractiveActionLeave | Occurs when the mouse cursor leaves the area of an interactive action. For the underlying JS methods see InteractiveActionLeave |
ViewerToolTipOpening | Occurs before a tooltip is opened, providing the ability to cancel its opening. For the underlying JS methods see ViewerToolTipOpening |
SendEmailBegin | Occurs before the report is exported and the E-mail message is sent. For the underlying JS methods see SendEmailBegin |
SendEmailEnd | Occurs after the report is exported and before the E-mail message is sent. For the underlying JS methods see SendEmailEnd |