Class XPBindingSource
- Namespace
- DevExpress.Xpo
- Assembly
- DevExpress.Xpo.v24.1.dll
A binding source that binds data from a data source to a control.
public class XPBindingSource : Component, IComponent, IDisposable, IBindingList, IList, ICollection, IEnumerable, ITypedList, ISupportInitialize, IXPClassInfoProvider, ISessionProvider, IObjectLayerProvider, IDataLayerProvider, IXPDictionaryProvider, IObjectChange
- Inheritance
-
XPBindingSource
- Implements
- Inherited Members
Constructors
XPBindingSource()
Initializes a new XPBindingSource instance.
public XPBindingSource()
XPBindingSource(IContainer)
Initializes a new XPBindingSource instance and adds this instance to container.
public XPBindingSource(IContainer container)
Parameters
container
IContainerA container that is the owner of the created XPBindingSource.
XPBindingSource(IServiceProvider)
Initializes a new instance of the XPBindingSource class with specified settings.
public XPBindingSource(IServiceProvider serviceProvider)
Parameters
serviceProvider
IServiceProviderAn object that implements the IServiceProvider interface. This object is assigned to the ServiceProvider property of the XPBindingSource’s default session.
XPBindingSource(IServiceProvider, IContainer)
Initializes a new instance of the XPBindingSource class with specified settings.
public XPBindingSource(IServiceProvider serviceProvider, IContainer container)
Parameters
serviceProvider
IServiceProviderAn object that implements the IServiceProvider interface. This object is assigned to the ServiceProvider property of the XPBindingSource’s default session.
container
IContainerA container that is the owner of the created XPBindingSource.
Fields
Initializing
protected bool Initializing
Field Value
Properties
BindingBehavior
Defines operations the bound control can perform with the data source.
public CollectionBindingBehavior BindingBehavior { get; set; }
Property Value
- CollectionBindingBehavior
A CollectionBindingBehavior value that defines how the bound control interacts with the data source.
Count
Gets the number of items the data source contains.
[Browsable(false)]
public int Count { get; }
Property Value
- int
The number of items in the data source.
DataSource
Gets or sets a data source the XPBindingSource binds to a control.
[TypeConverter("DevExpress.Xpo.Design.XPBindingSourceDataSourceReferenceConverter, DevExpress.Xpo.v24.1.Design, Version=24.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a")]
public object DataSource { get; set; }
Property Value
- object
An object that represents a data source for the XPBindingSource to use.
Dictionary
Gets or sets an XPDictionary.
[Browsable(false)]
public XPDictionary Dictionary { get; set; }
Property Value
- XPDictionary
An XPDictionary the XPBindingSource uses to get XPClassInfo metadata from the type of the data source’s items.
DisplayableProperties
Gets or sets a list of properties available for binding.
public string DisplayableProperties { get; set; }
Property Value
- string
A string that contains property paths separated by semicolons, for example, “FirstName;LastName;Company.Name;Address.City”.
this[int]
An indexer that provides access to the data source‘s specific object.
[Browsable(false)]
public object this[int index] { get; set; }
Parameters
index
intAn index of the object to be accessed.
Property Value
- object
An object that has the specified index.
ObjectClassInfo
Gets or sets the XPClassInfo metadata that describes the type of items the data source contains.
[TypeConverter("DevExpress.Xpo.Design.ObjectClassInfoTypeConverter, DevExpress.Xpo.v24.1.Design, Version=24.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a")]
public XPClassInfo ObjectClassInfo { get; set; }
Property Value
- XPClassInfo
Metadata that relates to the data source the XPBindingSource uses.
ObjectType
Gets or sets the type of items the data source contains.
[Browsable(false)]
public Type ObjectType { get; set; }
Property Value
- Type
A type of items the data source contains.
Methods
Dispose(bool)
protected override void Dispose(bool disposing)
Parameters
disposing
bool
Events
DataSourceChanged
Occurs when the DataSource property value changes.
public event EventHandler DataSourceChanged
Event Type
ListChanged
Occurs in one of the following cases: the DataSource property value changed, the data source’s element list changed, or individual elements in the data source changed.
public event ListChangedEventHandler ListChanged