Skip to main content
A newer version of this page is available.
All docs
V19.1

ASPxClientDashboardParameter Class

A client-side dashboard parameter.

Declaration

declare class ASPxClientDashboardParameter

Remarks

The ASPxClientDashboardParameter class exposes the ASPxClientDashboardParameter.Name and ASPxClientDashboardParameter.Value properties. These allow you to obtain the dashboard parameter name and specify its value on the client side.

Example

This example demonstrates how to change dashboard parameter values in the ASPxDashboard control on the client side using the ASPxClientDashboard.GetParameters method.

In this example, parameter values are specified using the ASPxClientDashboardParameter.SetValue method. The ASPxClientDashboard.ShowParametersDialog method is used to invoke the Dashboard Parameters dialog that displays applied parameter values.

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" 
    Inherits="ASPxDashboard_SetParameterValues.Default" %>

<%@ Register Assembly="DevExpress.Dashboard.v17.1.Web, Version=17.1.2.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" 
    Namespace="DevExpress.DashboardWeb" TagPrefix="dx" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div id="setParameterValuesButton" style="float: left; margin-left: 150px;"></div>
    <div id="showParametersForm" style="float: left; margin-left: 100px;"></div>

    <div style="position: absolute; left: 0; right: 0; top:50px; bottom:0;">
        <dx:ASPxDashboard ID="ASPxDashboard1" runat="server" 
            WorkingMode="Viewer" 
            ClientInstanceName="webViewer"
            ClientSideEvents-DashboardEndUpdate="function() { setParameterValues(); }"
            Width="100%" Height="100%">
        </dx:ASPxDashboard>
    </div>
    </form>
</body>
</html>
<script type="text/javascript" src="<%= Page.ResolveClientUrl("~/Scripts/ParameterValues.js") %>"></script>

Properties

Name Property

Obsolete. Gets the dashboard parameter name on the client side.

Declaration

Name: string

Property Value

Type Description
string

A string value that is the dashboard parameter name on the client side.

Remarks

Use the ASPxClientDashboardParameter.Value property to specify the dashboard parameter value on the client side.

Value Property

Obsolete. Gets the dashboard parameter value on the client side.

Declaration

Value: any

Property Value

Type Description
any

A string value that specifies the dashboard parameter value on the client side.

Remarks

Use the ASPxClientDashboardParameter.Name property to obtain the dashboard parameter name on the client side.

Methods

GetDefaultValue Method

Returns a default parameter value.

Declaration

GetDefaultValue(): any

Returns

Type Description
any

A default parameter value.

GetDescription Method

Returns the parameter’s description displayed to an end-user.

Declaration

GetDescription(): string

Returns

Type Description
string

A String that is the parameter’s description displayed to an end-user.

GetName Method

Returns a parameter name.

Declaration

GetName(): string

Returns

Type Description
string

A String that is the parameter name.

GetType Method

Returns a parameter type.

Declaration

GetType(): string

Returns

Type Description
string

A String that identifies the type of dashboard parameter value.

GetValue Method

Returns a current parameter value(s).

Declaration

GetValue(): any

Returns

Type Description
any

A current parameter value(s).

Remarks

Use the ASPxClientDashboardParameter.SetValue method to specify the current parameter value.

Note

Note that the GetValue method returns an array of values if multi-selection is enabled.

GetValues Method

Returns possible parameter values.

Declaration

GetValues(): ASPxClientDashboardParameterValue[]

Returns

Type Description
ASPxClientDashboardParameterValue[]

An array of ASPxClientDashboardParameterValue objects that provide access to parameter values and display texts.

Remarks

Use the ASPxClientDashboardParameter.SetValue method to specify the current parameter value.

SetValue(value) Method

Specifies the current parameter value(s).

Declaration

SetValue(
    value: any
): void

Parameters

Name Type Description
value any

The current parameter value(s).

Remarks

Use the ASPxClientDashboardParameter.GetValues method to obtain possible parameter values. The ASPxClientDashboardParameter.GetValue method returns the current parameter value.

Note

Note that the SetValue method can accept an array of values if multi-selection is enabled.