Skip to main content

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.v23.2.JSBasedControls.Common.dll

NuGet Package: DevExpress.Blazor.Reporting.JSBasedControls.Common

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