What is Dataview in ADO Dot Net ?

 Posted by Chikul on 12/23/2009 | Category: ADO.NET Interview questions | Views: 8241

The DataView provides different views of the data stored in a DataTable. That is we can customize the views of data from a DataTable. DataView can be used to sort, filter, and search the data in a DataTable , additionally we can add new rows and modify the content in a DataTable.

We can create DataView in two ways. Either we can use the DataView constructor, or we can create a reference to the DefaultView property of the DataTable.

DataView dView = new DataView(dTbl);
dView = dataSet.Tables(0).DefaultView;

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response