Progress® Telerik® Reporting R2 2017

Client Events

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:

JavaScript
<script>
  function onRenderingBegin() {
      console.log("rendering begin!");
  }
  function onRenderingEnd() {
      console.log("rendering end!");
  }
</script>
@(Html.TelerikReporting().ReportViewer()
        // each deferred script will be rendered at the place of TelerikReporting().DeferredScripts().
        //.Deferred()
        .ClientEvents(
                events => events
                    .RenderingBegin("onRenderingBegin")
                    .RenderingEnd("onRenderingEnd")
                    )
)

The following table list the available client events:

Event

Description

RenderingBegin

Rendering begin.

RenderingEnd

Rendering end.

PrintBegin

Print begin.

PrintEnd

Print end.

ExportBegin

Export begin.

ExportEnd

Export end.

UpdateUi

Update UI.

Error

Error occurred.

PageReady

Page is ready.

Ready

Report viewer is ready.

InteractiveActionExecuting

An interactive action is being executed and can be canceled.

InteractiveActionEnter

The mouse cursor has entered the area of an interactive action.

InteractiveActionLeave

The mouse cursor has left the area of an interactive action.

ViewerToolTipOpening

A tooltip opening has commenced and can be canceled.