码迷,mamicode.com
首页 > 其他好文 > 详细

DataView key Points

时间:2014-08-02 15:19:43      阅读:175      评论:0      收藏:0      [点我收藏+]

标签:http   os   io   for   cti   ar   new   amp   

A major function of the DataView is to allow for data binding on both Windows Forms and Web Forms.

Additionally, a DataView can be customized to present a subset of data from the DataTable. This capability lets you have two controls bound to the same DataTable, but that show different versions of the data. For example, one control might be bound to a DataView that shows all the rows in the table, and a second might be configured to display only the rows that have been deleted from the DataTable. The DataTable also has a DefaultView property. This returns the default DataView for the table. For example, if you want to create a custom view on the table, set the RowFilter on the DataView returned by the DefaultView.

To create a filtered and sorted view of data, set the RowFilter and Sort properties. Then, use the Item property to return a single DataRowView.

You can also add and delete from the set of rows using the AddNew and Delete methods. When you use those methods, the RowStateFilter property can set to specify that only deleted rows or new rows be displayed by the DataView.

 

DataView key Points,布布扣,bubuko.com

DataView key Points

标签:http   os   io   for   cti   ar   new   amp   

原文地址:http://www.cnblogs.com/kevinygq/p/3886887.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!