All docs
V21.1
21.2 (EAP/Beta)
21.1
20.2
20.1
19.2
The page you are viewing does not exist in version 19.2. This link will take you to the root page.
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

DxReportDesignerCallbacks.PreviewClick Property

Specifies the JavaScript function that handles the Web Report Designer’s PreviewClick client-side event.

Namespace: DevExpress.Blazor.Reporting

Assembly: DevExpress.Blazor.Reporting.v21.1.JSBasedControls.dll

Declaration

[Parameter]
public string PreviewClick { get; set; }

Property Value

Type Description
String

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

Remarks

The PreviewClick event occurs when a user clicks a report document in the Report Designer Preview.

The handler function receives two parameters - the first parameter is the client-side Report Designer (the event sender) and the second parameter is an object with the following properties and methods:

  • PageIndex
    A zero-based index of the clicked page.

  • Brick
    A visual brick object that is related to the clicked report control.

  • Handled
    Specifies whether default event handling is required.

  • DefaultHandler
    A function that runs when the Handled field is set to false (the default value). You can call this function within your event handler and set the Handled field to true to prevent the function from being called twice.

  • GetBrickText
    Returns the text displayed in the clicked element (report brick).

  • GetBrickValue
    Returns additional information on the brick.

For more information on report bricks, review the following help topic: Bricks.

The following code obtains the clicked element’s text:

window.ReportingDesignerCustomization = {
    onPreviewClick: function(s, e) {
        e.Brick && alert(e.GetBrickText())
    }
}
See Also