ASPxClientSideParametersModel.serializeParameters() Method

Serializes report parameters before passing them to the server.

Namespace: DevExpress.XtraReports.Web.Scripts

Assembly: DevExpress.XtraReports.v18.1.Web.Scripts.dll

Declaration

public void serializeParameters()
Public Sub serializeParameters

The serializeParameters function serializes report parameters before passing them to the server. If you need to change parameter values, register a custom function as demonstrated below.

function WebDocumentViewerInit(s, e) {
    var parametersModel = s.GetParametersModel();
    if (!parametersModel) { return; }
    var serializeParametersOriginal = parametersModel.serializeParameters;
    parametersModel.serializeParameters = function () {
        var serializedParameters = serializeParametersOriginal.apply(parametersModel);
        var reportParameter = serializedParameters.filter(function (p) { return p.Key === "MyParameterName" })[0];
        if (reportParameter) {
            reportParameter.Value = "my custom parameter value";
        }
        return serializedParameters;
    }
}