What is basic use of “DataView”

Q

What is basic use of “DataView” ?

✍: Guest

A

“DataView” represents a complete table or can be small section of rows depending on some criteria. It is best used for sorting and finding data with in “datatable”. Dataview has the following method’s
Find
It takes a array of values and returns the index of the row.
FindRow
This also takes array of values but returns a collection of “DataRow”.
If we want to manipulate data of “DataTable” object create “DataView” (Using the “DefaultView” we can create “DataView” object) of the “DataTable” object and use the following functionalities
AddNew
Adds a new row to the “DataView” object.
Delete
Deletes the specified row from “DataView” object.

2007-10-24, 5177👍, 0💬