Binding Data to a Control
Up to now all of the examples that have painted the contents of a DataSet have done so by iterating through the DataTables.Rows collection for each DataTable inside the DataSet. This is non-ideal for several reasons:
The burden of responsibility to paint the data manually every time there is an update in the DataSet contents falls on the developer.
The process of painting into a ListBox is error prone.
It is unwieldy to write code that paints only those DataRows with certain RowState values.
It is not easy to make the ListBox appealing to the eye when using it to display relational data.
The best solution to this problem is to use data binding, which connects a source of data to a consumer. The most popular source of data ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access