ConfigureDataConnectionWebEventArgs Class

Provides data for the ConfigureDataConnection events.

Namespace: DevExpress.DashboardWeb

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


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;

The following code snippets (auto-collected from DevExpress Examples) contain references to the ConfigureDataConnectionWebEventArgs class.


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.

See Also