Chapter 13: Using DataView Objects

Overview

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




Mastering C# Database Programming
Mastering the SAP Business Information Warehouse: Leveraging the Business Intelligence Capabilities of SAP NetWeaver
ISBN: 0764596373
EAN: 2147483647
Year: 2003
Pages: 181

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net