Binding Controls to Data

Binding controls to data is simply describing the process of displaying data (such as data from a database) in Windows Forms controls.

Simple data binding describes the process of displaying a single element of data in a control, for example, a TextBox displaying the value from a single column in a table such as a company name.

Complex data binding describes the process of binding a control to more than one source of data. For example, consider a combo box that displays a list of category names. What if the table you are displaying has only a category ID such as the Products and Categories tables in the Northwind sample database? You can use complex data binding to display the value from a column in one DataTable based on a foreign key value in another DataTable.

Was this article helpful?

0 0

Post a comment