Summary

In this chapter, you learned how the use DataView objects to filter and sort rows. The advantage of a DataView is that you can bind it to a visual component such as a DataGrid control.

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.

The RowFilter property of a DataView is similar to a WHERE clause in a SELECT statement. You can therefore use very powerful filter expressions in your DataView. For example, you can use AND, OR, NOT, IN, LIKE, comparison operators, arithmetic operators, wildcard characters (* and %), and aggregate functions.

You can find the index of a DataRowView in a DataView using the Find() method of a DataView. You can also get an array of DataRowView objects using the FindRows() method of a DataView.

A DataViewManager allows you to centrally manage multiple DataView objects in a DataSet. A DataViewManager also allows you to create DataView objects on the fly at runtime.




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