Skip to main content
.NET 6.0+

XPBaseCollection.BindingBehavior Property

Defines which operations a bound control can perform on a collection.

This enumeration has a FlagsAttribute that allows a bitwise combination of its member values.

Namespace: DevExpress.Xpo

Assembly: DevExpress.Xpo.v23.2.dll

NuGet Package: DevExpress.Xpo

Declaration

[DefaultValue(CollectionBindingBehavior.AllowNew | CollectionBindingBehavior.AllowRemove)]
public CollectionBindingBehavior BindingBehavior { get; set; }

Property Value

Type Default Description
CollectionBindingBehavior AllowNew | AllowRemove

The CollectionBindingBehavior which specifies which operations a bound control can perform on a collection.

Remarks

The XPBaseCollection class implements the IBindingList interface, so an XPCollection object can be bound to a visual control (for instance, the XtraGrid). The control will interact with the XPCollection via this interface. The BindingBehavior property determines which operations a bound control can perform on the collection (whether adding new and/or removing existing items is allowed for the bound control). Regardless of the BindingBehavior property’s value the collection’s contents can still be modified by calling the collection’s appropriate methods.

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

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