The requested page is not available for the requested platform. You are viewing the content for .NET Framework 4.5.2+ platform.
All docs
V19.1
19.2 (EAP/Beta)
19.1
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.
.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+

XPBindingSource.DataSource Property

Gets or sets a data source the XPBindingSource binds to a control.

Namespace: DevExpress.Xpo

Assembly: DevExpress.Xpo.v19.1.dll

Declaration

[DefaultValue(null)]
[TypeConverter("DevExpress.Xpo.Design.XPBindingSourceDataSourceReferenceConverter, DevExpress.Xpo.v19.1.Design, Version=19.1.99.0, Culture=neutral, PublicKeyToken=c38a27d2243c2672")]
public object DataSource { get; set; }
<DefaultValue(Nothing)>
<TypeConverter("DevExpress.Xpo.Design.XPBindingSourceDataSourceReferenceConverter, DevExpress.Xpo.v19.1.Design, Version=19.1.99.0, Culture=neutral, PublicKeyToken=c38a27d2243c2672")>
Public Property DataSource As Object
[DefaultValue(null)]
[TypeConverter("DevExpress.Xpo.Design.XPBindingSourceDataSourceReferenceConverter, DevExpress.Xpo.v19.1.Design, Version=19.1.99.0, Culture=neutral, PublicKeyToken=c38a27d2243c2672")]
public object DataSource { get; set; }
<DefaultValue(Nothing)>
<TypeConverter("DevExpress.Xpo.Design.XPBindingSourceDataSourceReferenceConverter, DevExpress.Xpo.v19.1.Design, Version=19.1.99.0, Culture=neutral, PublicKeyToken=c38a27d2243c2672")>
Public Property DataSource As Object

Property Value

Type Description
Object

An object that represents a data source for the XPBindingSource to use.

Property Value

Type Description
Object

An object that represents a data source for the XPBindingSource to use.

Remarks

The XPBindingSource component can use data from the following data sources:

  • XPO collections
  • System collections (see Collections)
  • Custom collections
  • Persistent objects

The XPBindingSource accepts generic and nongeneric collections.

The XPBindingSource supports most XPO collections fully, for example:

System collections, custom collections, and persistent objects may have the following limitations:

Description

Result

Example

A data source does not implement at least one of the following: IBindingList or INotifyPropertyChanged.

Changes within the data source do not trigger the ListChanged event, because the data source cannot notify the XPBindingSource of any changes.

A generic collection does not implement IXPDictionaryProvider.

Set the Dictionary or the ObjectClassInfo property manually, because the XPBindingSource cannot acquire the data source's metadata.

A nongeneric collection does not implement IXPClassInfoProvider.

Set the ObjectClassInfo property or both the Dictionary and ObjectType properties manually, because the XPBindingSource cannot acquire the data source's metadata.

A data source does not implement IXPSessionProvider.

After the XPBindingSource binds a data source to a control, you cannot add new elements to the data source. You can add new elements to a bound data source only within a Session. Sessions are created only for data sources that implement the IXPSessionProvider interface.

See Also