| DataView is popular object in ADO.NET just like view in sql.DataView is nothing but a object which represents bindable and customized view of DataTable object.There are lot of condition we need DataView like we have to retrieve subset of data from datatable or we have to do sorting ,filtering ,searching ,editing and navigation on data we can do with dataview. We can get DefaultView property of a DataTable returns the Default data view for the DataTable let us say we need data in sorting always then we can set it to defaultview.
To get this understand we take and example to sort data in ascending or descending order.Example:-
DataView dvobject = new DataView();
dvobject.Sort("ColumnName Asc|Desc"); | | |