This sample demonstrates the binding of a GDBG to custom collections. The GDBG can be bound to any collection that derives from the IList interface.
In this sample, the customer list is derived from the IBindingList interface. This gives additional control over adding, editing, and removing records from a list.
Features:
You can see the custom collections implementation in the Customer.cs file in this sample.
When an item is added, inserted, or removed, you need to raise the IBindingList.ListChanged event. The grid will listen to this ListChanged event and update the records accordingly.
The Customer class contains three public properties- ID, FirstName, and LastName.
The customer objects are added to CustomerCollection, which implements the IList and the IBindingList interfaces.