Binding to Other Objects (Arrays, Lists, etc.)

In addition to DataTable and DataViews, we can bind controls to simple arrays and list objects. A list object is any object that implements the IList interface. Besides the array, some other objects that implement the interface are the DataView, the ArrayList, and the CollectionBase (from which all collections are derived). So you see that we can bind controls to many more objects than we could in VB 6. You can also create your own bindable object just by implementing the interface yourself

To demonstrate this, let’s create a new project, ADOBook08-02. Add controls to the default form to make it look like Figure 8.10.

Figure 8.10. Bound array form.

Binding to a single-dimension array is really ...

Get ADO.NET Programming in Visual Basic™ .NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.