The Binding Class

The Binding class and the BindingCollection facilitate data binding on the control’s side. We saw some of this in the previous example of binding to an array. We can actually see the contents of the Binding collection if we click the Advanced tab of a control with a DataBindings property. This looks like Figure 8.11 for the TextBox control.

Figure 8.11. The Data Binding collection editor.

As you can see, you can bind almost any property to a bindable object. This could come in very handy if you wanted to be able to create forms at runtime using data stored in database tables or XML files.

The Bindable attribute we’ve mentioned ...

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.