Working with DataView Objects in Code
The DataView class offers functionality similar to that of the DataTable class’s Select method. Let’s take a closer look at this functionality and compare it to the Select method as we go.
Creating DataView Objects
To use a DataView object to view data in a DataTable, you must associate it with a DataTable object. You can specify the DataTable that the DataView will use in one of two ways: by setting the DataView object’s Table property or by using the DataView’s constructor. The following code snippets are equivalent:
Dim tbl As New DataTable("TableName") Dim vue As DataView 'Create the DataView and associate it with the DataTable vue = New DataView() vue.Table = tbl 'Perform both operations through ...