Creating Bindable Views of Data with a DataView

Up until now, the means by which data is extracted from a DataTable is to access the DataTable.Rows collection. Each DataRow in the DataTable.Rows collection has DataColumn objects that can be indexed by name or number. The first sample application in this chapter demonstrates the process of iterating through the DataTable.Rows collection to examine the data.

While this is an effective way of accessing the data inside a DataTable, it does not provide an easy means of sorting the data against a specific column or filtering the rows so that only specific DataRows in the DataTable.Rows collection are visible.

The DataView class is the correct way to view the contents of a DataTable in a sorted and/or ...

Get Microsoft® .NET Compact Framework Kick Start now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.