Application Development Using Visual Basic® and .NET
by Robert J. Oberg, Peter Thorsteinson, Dana L. Wyatt
DataGrid Control
The DataGrid control is a data-bound control that automatically displays a list of information in a series of rows and columns, as in a spreadsheet. A data-bound control is self-populating; that is, it fills itself with data when told the source of the data.
A DataGrid control must be bound to a data source using the DataSource and DataMember properties at design time or the SetDataBinding method at run time. Typically, a DataGrid control is bound to a DataTable, DataView or DataSet class (discussed in Chapter 13). However, you can also bind a DataGrid control to any class that implements the IList interface.
The ArrayList class, which we discussed in Chapter 6, implements the IList interface. In the GridDemo example, we will ...
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