| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
DataView ClassRepresents a databindable, customized view of a DataTable for sorting, filtering, searching, editing, and navigation.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Visibility | Name | Parameters | Return Type |
|---|---|---|---|
| public | AddNew | ( ) | DataRowView |
| public | BeginInit | ( ) | Void |
| protected | Close | ( ) | Void |
| protected | ColumnCollectionChanged | ( Object sender , CollectionChangeEventArgs e ) | Void |
| public | CopyTo | ( Array array , Int32 index ) | Void |
| public | Delete | ( Int32 index ) | Void |
| protected | Dispose | ( Boolean disposing ) | Void |
| public | EndInit | ( ) | Void |
| public | Equals | ( DataView view ) | Boolean |
| public | Find | ( Object key ) | Int32 |
| public | Find | ( Object key ) | Int32 |
| public | FindRows | ( Object key ) | DataRowView |
| public | FindRows | ( Object key ) | DataRowView |
| public | GetEnumerator | ( ) | IEnumerator |
| protected | IndexListChanged | ( Object sender , ListChangedEventArgs e ) | Void |
| protected | OnListChanged | ( ListChangedEventArgs e ) | Void |
| protected | Open | ( ) | Void |
| protected | Reset | ( ) | Void |
| public | ToTable | ( ) | DataTable |
| public | ToTable | ( String tableName , Boolean distinct , String columnNames ) | DataTable |
| public | ToTable | ( Boolean distinct , String columnNames ) | DataTable |
| public | ToTable | ( String tableName ) | DataTable |
| protected | UpdateIndex | ( Boolean force ) | Void |
| protected | UpdateIndex | ( ) | Void |
| Multicast | Name | Type |
|---|---|---|
| multicast | Initialized | EventHandler |
| multicast | ListChanged | ListChangedEventHandler |
A major function of the DataView is to allow 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 allows you to have two controls bound to the same DataTable, but showing different versions of the data. For example, one control may be bound to a DataView showing all of the rows in the table, while a second may be configured to display only the rows that have been deleted from the DataTable. The DataTable also has a DefaultView property which returns the default DataView for the table. For example, if you wish 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 ( DataView indexer ) 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.
DataSet DataTable DataViewManager
Check out related books at Amazon
© 2000-2008 Rey Nuñez All rights reserved.
If you have any question, comment or suggestion
about this site, please send us a note
You can help support aspxtreme