PDFViewerEventBuilder

Methods

Render(System.String)

Defines the handler of the Render client-side event. 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.

RETURNS

Returns the current instance of PDFViewerEventBuilder .

Example

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

Render(System.Func)

Defines the handler of the Render client-side event. 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.

RETURNS

Returns the current instance of PDFViewerEventBuilder .

Example

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

Open(System.String)

Defines the handler of the Open client-side event. 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.

RETURNS

Returns the current instance of PDFViewerEventBuilder .

Example

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

Open(System.Func)

Defines the handler of the Open client-side event. 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.

RETURNS

Returns the current instance of PDFViewerEventBuilder .

Example

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

Error(System.String)

Defines the handler of the Error client-side event. Fires when an error is encountered. By default, a dialog is shown with 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.

RETURNS

Returns the current instance of PDFViewerEventBuilder .

Example

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

Error(System.Func)

Defines the handler of the Error client-side event. Fires when an error is encountered. By default, a dialog is shown with 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.

RETURNS

Returns the current instance of PDFViewerEventBuilder .

Example

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

KendoKeydown(System.String)

Defines the handler of the KendoKeydown client-side event. Triggered when the user presses a keyboard key while the PDFViewer is focused.The event handler function context (available via the this keyword) will be set to the widget instance.

For more information see KendoKeydown event.

Parameters

handler - System.String

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

RETURNS

Returns the current instance of PDFViewerEventBuilder .

KendoKeydown(System.Func)

Defines the handler of the KendoKeydown client-side event. Triggered when the user presses a keyboard key while the PDFViewer is focused.The event handler function context (available via the this keyword) will be set to the widget instance.

For more information see KendoKeydown event.

Parameters

handler - System.Func<Object,Object>

The handler code wrapped in a text tag.

RETURNS

Returns the current instance of PDFViewerEventBuilder .