The requested page is not available for the requested platform. You are viewing the content for Default platform.

WebDocumentViewerClientSideEventsBuilder.PreviewClick(String) Method

Sets the name of the JavaScript function or the entire code that will handle the PreviewClick client-side event of the Web Document Viewer.

Namespace: DevExpress.AspNetCore.Reporting.WebDocumentViewer

Assembly: DevExpress.AspNetCore.Reporting.v19.1.dll


public WebDocumentViewerClientSideEventsBuilder PreviewClick(
    string callback
Public Function PreviewClick(
    callback As String
) As WebDocumentViewerClientSideEventsBuilder


Name Type Description
callback String

The name of a JavaScript function or the entire JavaScript function code used to handle the PreviewClick event.


Type Description

A WebDocumentViewerClientSideEventsBuilder that can be used to further configure the Document Viewer Client Side Events.


The PreviewClick event enables performing different actions when an end-user clicks the report document in the Web Document Viewer. When implementing a handling function, use the objects passed as parameters. The first parameter passes the event sender that is the ClientDocumentViewer object. The second one is an object with the following structure.

  • PageIndex
    A value specifying the zero-based index of the page that has been clicked.

  • Brick
    Provides information on a visual brick representing content of a report control that has been clicked.

  • Handled
    Specifies whether or not the event was handled and no default processing is required.

  • DefaultHandler
    A function that is performed if the Handled field is set to false (the default value). You can call this function within your event handler if required, and set the Handled field to true.

  • GetBrickText
    Returns the text displayed by the report element that has been clicked.

  • GetBrickValue
    Returns additional information on the brick.

The code sample below demonstrates how to obtain the text of an element that has been clicked.

    var documentViewer = Html.DevExpress().WebDocumentViewer("webDocumentViewer1")
        .ClientSideEvents(configure => { configure.PreviewClick("previewClick"); });;
See Also