DataSource Class
OBSOLETE
The Data
A data source that provides data for the dashboard.
Namespace: DevExpress.DashboardCommon
Assembly: DevExpress.Dashboard.v24.2.Core.dll
NuGet Package: DevExpress.Dashboard.Core
#Declaration
[Obsolete("The DataSource class is obsolete now. Use the DashboardSqlDataSource, DashboardOlapDataSource, DashboardEFDataSource and DashboardObjectDataSource classes instead.")]
public class DataSource :
DataSourceBase,
IDashboardDataSourceInternal,
IDashboardComponent,
IComponent,
IDisposable,
ISupportInitialize,
IDashboardDataSource,
ISupportPrefix
#Remarks
The DataSource objects are used to supply dashboards with data.
There are two primary approaches for creating data sources.
Provide your data as a collection of records. This collection must implement the IEnumerable or IListSource interface. To assign this collection to a data source, pass it to the DataSource constructor or assign it to the DataSource.Data property. The examples below demonstrate this approach.
Create a data provider represented by the
DevExpress.DashboardCommon.SqlDataProvider
orDevExpress.DashboardCommon.OlapDataProvider
classes. When creating a data provider, you can specify the connection parameters used to establish a connection to data. Then, pass the created provider to the DataSource constructor. The examples below demonstrate this approach.
Data-aware dashboard items have the DataDashboardItem.DataSource property that specifies a data source to which this item is actually bound.
A Dashboard also exposes the Dashboard.DataSources collection that contains data sources displayed within the Data Source Browser in the DashboardDesigner, so that end-users can use them when designing a dashboard.