In Some conditions we need to apply some condition on dataset in code behind. To apply condition on dataset we need to convert dataaset in Dataview.
Steps:
Create a object of dataview
Put dataset to data view
Apply rowfilter
We will take an example of Apply multiple conditions on dataview
Suppose we want to show only those rows which have status=Active or Inactive. We will apply below code
ds - is dataset having rows
dlTour is data list
DataView dv = new DataView();
dv = ds.Tables[0].DefaultView;
dv.RowFilter = " Status='Active' or Status='InActive'";
dlTour.DataSource = dv;