Skip to main content

ConfigureDataConnectionWebEventArgs Class

Provides data for the ConfigureDataConnection events.

Namespace: DevExpress.DashboardWeb

Assembly: DevExpress.Dashboard.v23.2.Web.dll

NuGet Package: DevExpress.Web.Dashboard.Common


public class ConfigureDataConnectionWebEventArgs :


The ConfigureDataConnection events are raised before the connection to a database is established and allows you to customize connection settings. Handle this event to change the parameters required to establish a connection to data (for instance, the server name, the database name, user credentials, the path to a data file, etc). To learn more, see the following topics.


The following code snippet shows how to configure data connections for SQLite, Excel, and OLAP data sources:

private void ASPxDashboard1_ConfigureDataConnection(object sender, ConfigureDataConnectionWebEventArgs e) {
    if (e.ConnectionName == "sqliteConnection") {
        SQLiteConnectionParameters sqliteParams = new SQLiteConnectionParameters();
        sqliteParams.FileName = "file:Data/nwind.db";
        e.ConnectionParameters = sqliteParams;
    if (e.ConnectionName == "olapConnection") {
        OlapConnectionParameters olapParams = new OlapConnectionParameters();
        olapParams.ConnectionString = "Provider=MSOLAP;Data Source=;"
            + "Initial catalog=Adventure Works DW Standard Edition;Cube name=Adventure Works;Query Timeout=100;";
        e.ConnectionParameters = olapParams;
    if (e.DataSourceName == "Excel Data Source") {
        ExcelDataSourceConnectionParameters excelParams = new ExcelDataSourceConnectionParameters(HttpContext.Current.Server.MapPath("App_Data/Sales.xlsx"));
        e.ConnectionParameters = excelParams;
See Also