ASPxClientDashboardViewer.GetParameters() Method
Returns dashboard parameter settings and metadata.
Namespace: DevExpress.DashboardWeb.Scripts
Assembly: DevExpress.Dashboard.v18.2.Web.WebForms.Scripts.dll
Declaration
Returns
Type | Description |
---|---|
ASPxClientDashboardParameters | A ASPxClientDashboardParameters object that is a collection of ASPxClientDashboardParameter objects. |
Remarks
ASPxClientDashboardParameter class objects returned by the GetParameters method allow you to obtain parameter settings such as the parameter type (the ASPxClientDashboardParameter.GetType method), the default parameter value (the ASPxClientDashboardParameter.GetDefaultValue method), the parameter name (the ASPxClientDashboardParameter.GetName method), etc.
The ASPxClientDashboardParameter.GetValues method returns possible parameter values. Use the ASPxClientDashboardParameter.SetValue method to specify the current parameter value.
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.
Note
A complete sample project is available at https://github.com/DevExpress-Examples/how-to-specify-dashboard-parameter-values-on-the-client-side-in-the-web-viewer-t205300.
- ParameterValues.js (C#)
- WebForm1.aspx.cs
- WebForm1.aspx (C#)
- WebForm1.aspx.vb
- ParameterValues.js (VB.NET)
- WebForm1.aspx (VB.NET)
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"
});
};