|
|
In chapter 11, "Using DataSet Objects to Modify Data," you saw that you can filter and sort the DataRow objects in a DataTable using the Select() method. In this chapter, you'll learn how to use DataView objects to also filter and sort rows. The advantage of a DataView is that you can bind it to a visual component such as a DataGrid control, and you'll also see how to do that in this chapter.
A DataView stores copies of the rows in a DataTable as DataRowView objects. The DataRowView objects provide access to the underlying DataRow objects in a DataTable. Therefore, when you examine and edit the contents of a DataRowView, you are actually working with the underlying DataRow. Keep that in mind when reading this chapter.
Featured in this chapter:
The DataView class
Creating and using a DataView object
Using the default sort algorithm
Performing advanced filtering
The DataRowView class
Finding DataRowView objects in a DataView
Adding, modifying, and removing DataRowView objects from a DataView
Creating child DataView objects
The DataViewManager class
Creating and using a DataViewManager object
Creating a DataView using Visual Studio .NET
|
|