In web application, I fetch the data from back end and the data is now availbale in dataset. I have 5 columns in that dataset, but i need only one column, so how can i get only one column out of 5 columns. I use dataview but it is not getting.
DataView dv = ds.Tables[0].DefaultView;
dv.RowFilter= "empid";
but i am not getting. can you helpme
With the help of dataview you can create another table which has only required columns which you need
);//Add name of required
You can get full example from the below link
Click
or
You can remove extra columns
to remove individual columns which you feel are extra one.
Don’t forget to ds.AcceptChanges() after deleting rows or they will still be in the dataset.