New to Telerik UI for ASP.NET Core? Download free 30-day trial

PDFViewerEventBuilder

Methods

Render(System.String)

Fires when a page is rendered.

For more information see Render event.

Parameters

handler - System.String

The name of the JavaScript function that will handle the render event.

Example


            @(Html.Kendo().PDFViewer()
               .Name("pdfviewer")
               .Events(events => events.Render("onRender"))
             )

Render(System.Func)

Fires when a page is rendered.

For more information see Render event.

Parameters

handler - System.Func<Object,Object>

The handler code wrapped in a text tag.

Example


            @(Html.Kendo().PDFViewer()
               .Name("pdfviewer")
               .Events(events => events.Render(@<text>
                  function(e) {
                      // Handle the Render event inline.
                  }
                  </text>)
               )
             )

Open(System.String)

Fires when a PDF is opened in the viewer.

For more information see Open event.

Parameters

handler - System.String

The name of the JavaScript function that will handle the open event.

Example


            @(Html.Kendo().PDFViewer()
               .Name("pdfviewer")
               .Events(events => events.Open("onOpen"))
             )

Open(System.Func)

Fires when a PDF is opened in the viewer.

For more information see Open event.

Parameters

handler - System.Func<Object,Object>

The handler code wrapped in a text tag.

Example


            @(Html.Kendo().PDFViewer()
               .Name("pdfviewer")
               .Events(events => events.Open(@<text>
                  function(e) {
                      // Handle the Open event inline.
                  }
                  </text>)
               )
             )

Error(System.String)

Fires when an error is encountered. By default, a dialog is shown with an error message. The dialog will not be shown if the event is prevented.

For more information see Error event.

Parameters

handler - System.String

The name of the JavaScript function that will handle the error event.

Example


            @(Html.Kendo().PDFViewer()
               .Name("pdfviewer")
               .Events(events => events.Error("onError"))
             )

Error(System.Func)

Fires when an error is encountered. By default, a dialog is shown with an error message. The dialog will not be shown if the event is prevented.

For more information see Error event.

Parameters

handler - System.Func<Object,Object>

The handler code wrapped in a text tag.

Example


            @(Html.Kendo().PDFViewer()
               .Name("pdfviewer")
               .Events(events => events.Error(@<text>
                  function(e) {
                      // Handle the Error event inline.
                  }
                  </text>)
               )
             )

In this article
Not finding the help you need?