Back to Devexpress

CollectionBindingBehavior Enum

xpo-devexpress-dot-xpo-9907a463.md

latest2.4 KB
Original Source

CollectionBindingBehavior Enum

Contains values that specify which operations can be performed on a collection.

Namespace : DevExpress.Xpo

Assembly : DevExpress.Xpo.v25.2.dll

NuGet Package : DevExpress.Xpo

Declaration

csharp
[Flags]
public enum CollectionBindingBehavior
vb
<Flags>
Public Enum CollectionBindingBehavior

Members

NameDescription
AllowNone

Specifies that items are not allowed to be added to or removed from a collection by a bound control.

| | AllowNew |

Specifies that new items can be added to a collection by a bound control.

| | AllowRemove |

Specifies that items can be removed from a collection by a bound control.

|

The following properties accept/return CollectionBindingBehavior values:

Remarks

A collection in XPO (the XPBaseCollection class descendant) implements the IBindingList interface, so it can be bound to a visual control (for instance, the XtraGrid). The control will interact with the XPCollection via this interface. Use the collection’s XPBaseCollection.BindingBehavior property of the CollectionBindingBehavior class to specify which operations on the collection are enabled for the bound control.

The XPBaseCollection.BindingBehavior property’s value determines the return values of the collection’s AllowNew and AllowRemove properties.

See Also

BindingBehavior

DevExpress.Xpo Namespace