-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathWebForm1.aspx.cs
22 lines (20 loc) · 958 Bytes
/
WebForm1.aspx.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
using DevExpress.DashboardWeb;
using DevExpress.DataAccess.Web;
using System;
using System.Linq;
namespace ASPxDashboard_CustomParameters {
public partial class WebForm1 : System.Web.UI.Page {
protected void Page_Load(object sender, EventArgs e) {
DashboardFileStorage dashboardFileStorage = new DashboardFileStorage("~/App_Data/Dashboards");
ASPxDashboard1.SetConnectionStringsProvider(new ConfigFileConnectionStringsProvider());
ASPxDashboard1.SetDashboardStorage(dashboardFileStorage);
ASPxDashboard1.CustomParameters += ASPxDashboard1_CustomParameters;
}
protected void ASPxDashboard1_CustomParameters(object sender, CustomParametersWebEventArgs e) {
var countryParam = e.Parameters.FirstOrDefault(p => p.Name == "CountryDashboardParameter");
if (countryParam != null) {
countryParam.Value = "Brazil";
}
}
}
}