Purpose of DataView

State the purpose of DataView?

E

Expert

Verified

DataView contains the user-defined view of the table. A complete table or a small section of the table depends upon some criteria which can be presented by an object of the DataView class. This class can be used to sort and find the data within the DataTable.

The DataView class has the following methods:

a) Find() – This method finds a row in a DataView by using sort key value.

b) AddNew() -  This method adds a new row to the DataView object.

c) FindRows() -  This method uses the sort key value to match it with columns of DataRowView objects. It returns the array of every corresponding objects of DataRowView whose columns match with sort key value.

d) Delete() -  This method deletes the required row from the DataView object in accordance with the specified index.

   Related Questions in DOT NET Programming

©TutorsGlobe All rights reserved 2022-2023.