Skip to main content
A newer version of this page is available. .

ASPxClientDashboardViewer.BeginUpdateParameters() Method

Namespace: DevExpress.DashboardWeb.Scripts

Assembly: DevExpress.Dashboard.v18.2.Web.WebForms.Scripts.dll

Declaration

public void BeginUpdateParameters()

Remarks

Use the ASPxClientDashboardViewer.GetParameters method to access dashboard parameter settings and metadata.

Example

This example demonstrates how to change dashboard parameter values in the Web Viewer on the client side using the ASPxClientDashboardViewer.GetParameters method.

In this example, current parameter values are specified between the ASPxClientDashboardViewer.BeginUpdateParameters and ASPxClientDashboardViewer.EndUpdateParameters method calls using the ASPxClientDashboardParameter.SetValue method.

function specifyParameterValues() {
    var specifyValues = function () {
        var parameters = webViewer.GetParameters();
        var parameter1 = parameters.GetParameterByName("category1");
        var parameter2 = parameters.GetParameterByName("startDate1");
        webViewer.BeginUpdateParameters();
        parameter1.SetValue(parameter1.GetValues()[1].GetValue());
        parameter2.SetValue(new Date(1995, 3, 1));
        webViewer.EndUpdateParameters();
    };

    $("#buttonContainer").dxButton({
        clickAction: specifyValues,
        text: "Specify parameter values"
    });
};
See Also