WebDocumentViewerClientSideEventsBuilderBase<TBuilder, TEvents>.ParametersReset(String) Method
Specifies the JavaScript function that handles the client-side ParametersReset event.
Namespace: DevExpress.AspNetCore.Reporting.WebDocumentViewer
Assembly: DevExpress.AspNetCore.Reporting.v24.2.dll
NuGet Package: DevExpress.AspNetCore.Reporting
#Declaration
#Parameters
Name | Type | Description |
---|---|---|
callback | String | The name of a Java |
#Returns
Type | Description |
---|---|
TBuilder | The Web |
#Remarks
The ParametersReset
event is raised when the user clicks the Reset button in the Preview Parameters panel. The ResetParameters method also raises the ParametersReset
event.
The event handler function receives the following parameters:
- Event sender (the client Document Viewer object that exposes the IPreviewModel interface)
- An object that exposes two properties:
- ParametersViewModel
A View Model for report parameters. - Parameters
Report parameters whose values were reset.
- ParametersViewModel
The following code snippet collapses the Parameters panel after parameter values are reset:
<script type="text/javascript" id="script">
function parametersReset(s, e) {
var preview = s.GetPreviewModel();
if (preview) {
preview.tabPanel.collapsed = true;
}
}
</script>
@{
var viewerRender = Html.DevExpress().WebDocumentViewer("DocumentViewer")
.Height("1000px")
.ClientSideEvents(configure => configure.ParametersReset("onParametersReset"))
.Bind("TestReport");
@viewerRender.RenderHtml()
}