[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Report and Dashboard Server
 [Expand]Getting Started
 [Expand]Basic Concepts and Terminology
 [Expand]Main Features
 [Collapse]Building the Designer and Viewer Applications
  [Expand]WinForms Designer
  [Collapse]WinForms Viewer
    Touch Support
    Adding the DashboardViewer Control
    Loading a Dashboard
    Providing Data
    Manage Printing and Exporting Capabilities
    Manage Interactivity Capabilities
    Manage Dashboard Parameters
    Customize Dashboard Colors
    Manage Dashboard Layout
    Obtaining Underlying and Displayed Data
    Access to Underlying Controls
    Popup Menus
   [Expand]Dialogs and Wizards
  [Expand]Web Dashboard
  [Expand]WPF Viewer
  [Expand]Web Viewer
 [Expand]Creating Dashboards
 [Expand]Design-Time Features
  Video Tutorials
  End-User Documentation
 [Expand]Redistribution and Deployment
 [Expand]Member Tables
 [Expand]API Reference
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Manage Dashboard Parameters

The DashboardViewer provides a built-in Dashboard Parameters dialog, providing the capability to change dashboard parameter values. This dialog is created automatically, depending on the parameter type and visibility settings.

Expanded Standard Parameter Editor

To invoke the Dashboard Parameters dialog in the DashboardViewer, click the Parameters button (the icon) in the Dashboard Title.

Select the required parameter values in the Dashboard Parameters dialog and click the Submit button to apply the changes. To reset changes to the default values, click the Reset button.

To invoke this dialog in code, use the DashboardViewer.ShowDashboardParametersForm method.

Expanded Changing Parameter Values in Code

You can change dashboard parameter values in the DashboardViewer using the DashboardViewer.Parameters property.

The DashboardParameterDescriptor class objects returned by the DashboardViewer.Parameters property allow you to obtain parameter settings such as the parameter type (the DashboardParameterDescriptor.Type property), the default parameter value (the DashboardParameterDescriptor.DefaultValue property), the parameter name (the DashboardParameterDescriptor.Name property), etc.

The DashboardParameterDescriptor.Values property returns possible parameter values. Use the DashboardParameterDescriptor.Value property to obtain or specify the current parameter value. If you change multiple values, wrap the code in the DashboardViewer.BeginUpdateParameters and DashboardViewer.EndUpdateParameters method calls.

The code snippet below shows how to specify values of DateTime parameters using the DashboardViewer API.

The DashboardViewer also provides the DashboardViewer.CustomParameters event that allows you to change dashboard parameter values at runtime. For instance, you can forcibly change a parameter value when an end-user changes this value in the Dashboard Parameters dialog.

Expanded See Also

Is this topic helpful?​​​​​​​