Back to Devexpress

ReportDesignerClientSideEventsBuilder.Preview(Action<ReportDesignerPreviewClientSideEventsBuilder>) Method

xtrareports-devexpress-dot-aspnetcore-dot-reporting-dot-reportdesigner-dot-reportdesignerclientsideeventsbuilder-dot-preview-x28-action-reportdesignerpreviewclientsideeventsbuilder-x29.md

latest3.8 KB
Original Source

ReportDesignerClientSideEventsBuilder.Preview(Action<ReportDesignerPreviewClientSideEventsBuilder>) Method

Provides access to the ReportDesignerPreviewClientSideEventsBuilder object that allows you to handle the client-side events specific to the Web Report Designer‘s Preview.

Namespace : DevExpress.AspNetCore.Reporting.ReportDesigner

Assembly : DevExpress.AspNetCore.Reporting.v25.2.dll

NuGet Package : DevExpress.AspNetCore.Reporting

Declaration

csharp
public ReportDesignerClientSideEventsBuilder Preview(
    Action<ReportDesignerPreviewClientSideEventsBuilder> configure
)
vb
Public Function Preview(
    configure As Action(Of ReportDesignerPreviewClientSideEventsBuilder)
) As ReportDesignerClientSideEventsBuilder

Parameters

NameTypeDescription
configureAction<ReportDesignerPreviewClientSideEventsBuilder>

A Action<T> delegate method that allows you to assign handlers to the client-side events using the methods exposed by the ReportDesignerPreviewClientSideEventsBuilder object, which is passed as the delegate parameter.

|

Returns

TypeDescription
ReportDesignerClientSideEventsBuilder

A ReportDesignerClientSideEventsBuilder that can be used to further configure the Report Designer Client Side Events.

|

Remarks

The code below illustrates how to access and handle client-side events specific to the Web Report Designer’s Preview.

@{
    var designer = Html.DevExpress().ReportDesigner("reportDesigner1").Height("1000px")
        .Bind(Model.Report)
        .DataSources(configureDS => { foreach (var ds in Model.DataSources) { configureDS.Add(ds.Key, ds.Value); } })
        .ClientSideEvents(configure => { configure.Preview(configure => { configure.CustomizeElements("customizeElements"); }); } );
}
@designer
javascript
<script type="text/javascript" id="script">
    function customizeElements(s, e) {
      //...
    }
</script>

See Also

ReportDesignerClientSideEventsBuilder Class

ReportDesignerClientSideEventsBuilder Members

DevExpress.AspNetCore.Reporting.ReportDesigner Namespace