The DataView: Filtering, Adding, Editing, Sorting, and Deleting DataRowViews

As previously mentioned, a DataView is a customized view of a DataTable. Essentially, when you create a DataView you are taking a snapshot of the DataTable and then manipulating the data some how—whether it be sorting, filtering, adding, etc. For instance, you can create two DataView objects from one DataTable and filter out all rows where the primary key value starts with “A” in one of them and in the second you can filter out all rows where the primary key value starts with “B”. Each of the two DataView objects is a separate entity to a degree, but they are still dependent and bound to the DataTable from which they were both derived.

A DataView can be created using ...

Get Programming Data-Driven Web Applications with ASP.NET 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.