Using the DataView Object
The DataView object represents an in-memory database view. You can use a DataView object to create a sortable, filterable view of a DataTable.
The DataView object supports three important properties:
• Sort—
Enables you to sort the rows represented by the DataView.
• RowFilter—
Enables you to filter the rows represented by the DataView.
• RowStateFilter—
Enables you to filter the rows represented by the DataView according to the row state (for example, OriginalRows, CurrentRows, Unchanged).
The easiest way to create a new DataView is to use the DefaultView property exposed by the DataTable class like this:
Dim dataView1 As DataView = dataTable1.DefaultView;
The DefaultView property returns an unsorted, unfiltered view ...
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