dashboard-devexpress-dot-dashboardcommon-6a9afdc3.md
The DataSource class is obsolete now. Use the DashboardSqlDataSource, DashboardOlapDataSource, DashboardEFDataSource and DashboardObjectDataSource classes instead.
A data source that provides data for the dashboard.
Namespace : DevExpress.DashboardCommon
Assembly : DevExpress.Dashboard.v25.2.Core.dll
NuGet Package : DevExpress.Dashboard.Core
[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
<Obsolete("The DataSource class is obsolete now. Use the DashboardSqlDataSource, DashboardOlapDataSource, DashboardEFDataSource and DashboardObjectDataSource classes instead.")>
Public Class DataSource
Inherits DataSourceBase
Implements IDashboardDataSourceInternal,
IDashboardComponent,
IComponent,
IDisposable,
ISupportInitialize,
IDashboardDataSource,
ISupportPrefix
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 or DevExpress.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.
Object DevExpress.Utils.Controls.DisposableObject DevExpress.DataAccess.DataSourceBase DataSource
See Also