BaseView.DataSource Property

Gets the data source whose data is displayed by a View.

Namespace: DevExpress.XtraGrid.Views.Base

Assembly: DevExpress.XtraGrid.v20.1.dll

Declaration

[Browsable(false)]
public virtual object DataSource { get; }
<Browsable(False)>
Public Overridable ReadOnly Property DataSource As Object

Property Value

Type Description
Object

A data source object whose data is displayed by the current View.

Remarks

This property returns the data source which contains data displayed by the current View. For the GridControl.MainView, the property returns the data source specified by the GridControl.DataSource and GridControl.DataMember properties. If these properties refer to a specific DataTable object, the current property will return the DataView object created for this DataTable. If you populate the grid by binding it to an object implementing the IList interface, the DataSource property will return this IList.

If the current View represents a detail clone view, the DataSource property will return the data source containing data only for this clone. For detail pattern Views, the DataSource property returns null. Refer to the Master-Detail Relationships topic for more information on clone and pattern Views.

See Also