Example #1
0
 private void ASPxDashboardExcel_ConfigureDataConnection(object sender, ConfigureDataConnectionWebEventArgs e)
 {
     if (e.ConnectionName == "excelDataConnection")
     {
         var excelParams = new ExcelDataSourceConnectionParameters(HostingEnvironment.MapPath(@"~/App_Data/Sales.xlsx"));
         e.ConnectionParameters = excelParams;
     }
 }
 private static void Configurator_ConfigureDataConnection(object sender, ConfigureDataConnectionWebEventArgs e)
 {
     if (e.ConnectionName == "excelDataConnection")
     {
         ExcelDataSourceConnectionParameters excelParams = new ExcelDataSourceConnectionParameters(fileProvider.GetFileInfo("Data/Sales.xlsx").PhysicalPath);
         e.ConnectionParameters = excelParams;
     }
 }