dashboard-devexpress-dot-dashboardweb-dot-dashboardconfigurator-15d5da23.md
Occurs before data is loaded from the data store and allows you to customize dashboard parameters that are used for data processing.
Namespace : DevExpress.DashboardWeb
Assembly : DevExpress.Dashboard.v25.2.Web.dll
NuGet Package : DevExpress.Web.Dashboard.Common
public event CustomParametersWebEventHandler CustomParameters
Public Event CustomParameters As CustomParametersWebEventHandler
The CustomParameters event's data class is CustomParametersWebEventArgs. The following properties provide information specific to this event:
| Property | Description |
|---|---|
| DashboardId | Gets the identifier of the required dashboard. |
| Parameters | Gets or sets dashboard parameters. Inherited from CustomParametersEventArgs. |
The CustomParameters event allows you to access a collection of dashboard parameters (e.Parameters) and change actual parameter values, parameter settings, or even add new parameters.
To set parameter values at runtime, use the dashboard state.
Parameter values specified in the CustomParameters event handler are set before executing a data query. They are not displayed in the Dashboard Parameters dialog. However, if the IncludeHiddenParameters client property is enabled (for example, DashboardExcelExportOptions.IncludeHiddenParameters), a user can still get access to all hidden parameters with their values.
Encode the passed parameter value if possible. Do not store any sensitive information in dashboard parameters that isn’t encrypted.
The following code snippets (auto-collected from DevExpress Examples) contain references to the CustomParameters event.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
configurator.CustomParameters += (s, e) => {
var value = Convert.ToInt32(contextAccessor?.HttpContext?.Request.Headers["ProductId"].FirstOrDefault());
configurator.CustomParameters += (s, e) => {
var countryParam = e.Parameters.FirstOrDefault(p => p.Name == "CountryDashboardParameter");
aspnet-core-dashboard-use-different-caches/CS/AspNetCoreDashboardUseDifferentCaches/Startup.cs#L56
// Specifies a unique cache parameter.
configurator.CustomParameters += (sender, e) => {
e.Parameters.Add(new DashboardParameter("UniqueCacheParam", typeof(Guid), serviceProvider.GetService<CacheManager>().UniqueCacheParam));
AddHandler DashboardConfigurator.Default.CustomParameters, AddressOf Default_CustomParameters
End Sub
See Also