DataView

A DataView object provides a view into a subset of the rows contained in a DataTable. DataView properties let you select rows with a certain state (added, deleted, modified, and so forth) or with certain data values.

A program can use more than one DataView attached to the same DataTable to provide different views of the data. DataViews can act as data sources for bound controls so they make displaying various selections of the data easy.

Example program DataViews, shown in Figure 5.9, uses a DataTable and three DataViews to easily display records in different states. If you add, modify, and delete records in the first DataGrid control, the others show the records that are added, modified, and deleted. This program sets the DataView ...

Get Visual Basic® .NET Database Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.