Skip to main content

CustomParametersEventArgs.Parameters Property

Gets or sets dashboard parameters.

Namespace: DevExpress.DashboardCommon

Assembly: DevExpress.Dashboard.v24.2.Core.dll

Declaration

public List<IParameter> Parameters { get; set; }

Property Value

Type Description
List<IParameter>

A collection ob objects implementing the IParameter interface.

Remarks

Use the Parameters property to specify dashboard parameter settings.

Example

The following example shows how to filter a custom SQL query by changing a parameter value in the DashboardViewer.CustomParameters event handler.

In this example, the custIDQueryParameter query parameter is included in a WHERE clause of a custom SQL query. The custIDQueryParameter parameter is also bound to the hidden custIDDashboardParameter dashboard parameter. The value of this parameter is changed at runtime by handling the DashboardViewer.CustomParameters event which is raised before the DashboardViewer sends a query to a database.

View Example

using DevExpress.DashboardCommon;
using System.Linq;

namespace Dashboard_CustomParameters_Win {
    public partial class Form1 : DevExpress.XtraEditors.XtraForm {
        public Form1() {
            InitializeComponent();
            dashboardViewer1.LoadDashboard(@"..\..\Data\Dashboard.xml");
        }

        private void dashboardViewer1_CustomParameters(object sender, CustomParametersEventArgs e) {
            var custIDParameter = e.Parameters.FirstOrDefault(p => p.Name == "custIDDashboardParameter");
            if (custIDParameter != null) {
                custIDParameter.Value = "AROUT";
            }
        }
    }
}
See Also