Back to Devexpress

ASPxDashboard.SetDataSourceStorage(IDataSourceStorage) Method

dashboard-devexpress-dot-dashboardweb-dot-aspxdashboard-dot-setdatasourcestorage-x28-devexpress-dot-dashboardweb-dot-idatasourcestorage-x29.md

latest6.6 KB
Original Source

ASPxDashboard.SetDataSourceStorage(IDataSourceStorage) Method

Specifies a data source storage for the Web Dashboard.

Namespace : DevExpress.DashboardWeb

Assembly : DevExpress.Dashboard.v25.2.Web.WebForms.dll

NuGet Package : DevExpress.Web.Dashboard

Declaration

csharp
public void SetDataSourceStorage(
    IDataSourceStorage dataSourceStorage
)
vb
Public Sub SetDataSourceStorage(
    dataSourceStorage As IDataSourceStorage
)

Parameters

NameTypeDescription
dataSourceStorageIDataSourceStorage

An object implementing the IDataSourceStorage interface that is a storage of the dashboard data sources.

|

Remarks

To learn more, see Register Default Data Sources.

The following code snippets (auto-collected from DevExpress Examples) contain references to the SetDataSourceStorage(IDataSourceStorage) method.

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.

asp-net-web-forms-dashboard-register-data-sources/CS/WebFormsDashboardDataSources/Pages/ObjectDashboard.aspx.cs#L23

csharp
// Set the configured data source storage.
ASPxDashboardObjectDS.SetDataSourceStorage(dataSourceStorage);

asp-net-web-forms-dashboard-localization/CS/DashboardLocalizationManualWeb/Default.aspx.cs#L8

csharp
protected void Page_Load(object sender, EventArgs e) {
    ASPxDashboard1.SetDataSourceStorage(CreateDataSourceStorage());
}

asp-net-web-forms-dashboard-custom-properties-sample/CS/WebFormsDashboardCustomPropertiesSample/Default.aspx.cs#L37

csharp
ASPxDashboard1.SetDataSourceStorage(dataSourceStorage);
}

web-forms-dashboard-handle-errors/CS/WebFormsCustomTextForInternalDashboardErrors/WebForm1.aspx.cs#L29

csharp
ASPxDashboard1.SetDashboardStorage(new DashboardFileStorage(Server.MapPath("~/App_Data/Dashboards")));
ASPxDashboard1.SetDataSourceStorage(dataSourceStrorage);
ASPxDashboard1.ConfigureDataConnection += ASPxDashboard1_ConfigureDataConnection;

web-forms-dashboard-enable-export-in-data-inspector/CS/WebForm1.aspx.cs#L19

csharp
dataSourceStorage.RegisterDataSource("extractDataSource", extractDataSource.SaveToXml());
    ASPxDashboard1.SetDataSourceStorage(dataSourceStorage);
}

asp-net-web-forms-dashboard-register-data-sources/VB/WebFormsDashboardDataSources/Pages/ObjectDashboard.aspx.vb#L22

vb
' Set the configured data source storage.
ASPxDashboardObjectDS.SetDataSourceStorage(dataSourceStorage)
AddHandler ASPxDashboardObjectDS.DataLoading, AddressOf Me.ASPxDashboardObjectDS_DataLoading

asp-net-web-forms-dashboard-custom-properties-sample/VB/WebFormsDashboardCustomPropertiesSample/Default.aspx.vb#L38

vb
ASPxDashboard1.SetDataSourceStorage(dataSourceStorage)
End Sub

web-forms-dashboard-handle-errors/VB/WebFormsCustomTextForInternalDashboardErrors/WebForm1.aspx.vb#L31

vb
ASPxDashboard1.SetDashboardStorage(New DashboardFileStorage(Server.MapPath("~/App_Data/Dashboards")))
ASPxDashboard1.SetDataSourceStorage(dataSourceStrorage)
AddHandler ASPxDashboard1.ConfigureDataConnection, AddressOf Me.ASPxDashboard1_ConfigureDataConnection

web-forms-dashboard-enable-export-in-data-inspector/VB/WebForm1.aspx.vb#L21

vb
dataSourceStorage.RegisterDataSource("extractDataSource", extractDataSource.SaveToXml())
    ASPxDashboard1.SetDataSourceStorage(dataSourceStorage)
End Sub

web-forms-dashboard-save-dashboards-title-as-file-name/VB/DXWebApplication2/Default.aspx.vb#L33

vb
dataSourceStorage.RegisterDataSource("excelDataSource", excelDataSource.SaveToXml())
    ASPxDashboard1.SetDataSourceStorage(dataSourceStorage)
End Sub

See Also

ASPxDashboard Class

ASPxDashboard Members

DevExpress.DashboardWeb Namespace