Export (0) Print
Expand All

IBindingList Interface

Provides the features required to support both complex and simple scenarios when binding to a data source.

Namespace:  System.ComponentModel
Assembly:  System (in System.dll)

public interface IBindingList extends IList, ICollection, IEnumerable

This interface is implemented by the DataView class. Implementation of a method should exhibit the same behavior as the implementation of that method in the DataView class.

When you call the ApplySort or RemoveSort methods, you should raise a ListChanged event with the Reset enumeration.

When you call the AddNew method, you should raise a ListChanged event with the ItemAdded enumeration carrying the appropriate index. The added row is in a state where pressing the ESC on a DataGridView control can remove the new row. Raising the ListChanged event with the ItemAdded enumeration a second time on this row indicates that the item is now a row not in the "new" state.

When you remove an item or call the CancelEdit method on a new row (if that row implements IEditableObject), you should raise a ListChanged event with the ItemDeleted enumeration carrying the appropriate index.

The following example provides a simple implementation of the IBindingList interface. The CustomerList class stores customer information in a list. This example assumes that you have used the Customer class that can be found in the example in the IEditableObject class.

No code example is currently available or this language may not be supported.

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98, Windows CE, Windows Mobile for Smartphone, Windows Mobile for Pocket PC, Xbox 360, Zune

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0, 1.1, 1.0

.NET Compact Framework

Supported in: 3.5, 2.0, 1.0

XNA Framework

Supported in: 3.0, 2.0, 1.0

Community Additions

ADD
Show:
© 2014 Microsoft