Skip to main content
.NET Standard 2.0+

CollectionBindingBehavior Enum

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

Namespace: DevExpress.Xpo

Assembly: DevExpress.Xpo.v22.1.dll

Declaration

[Flags]
public enum CollectionBindingBehavior

Members

Name Description
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.

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.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the CollectionBindingBehavior enum.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also