remove data value from dataset

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a dataset that is populating my GridView, BUT there are values in the
dataset that I do not need to show in my grid, This is a datavalue not a row
or column value, so how can I exclude this value from my dataset and not show
it in my grid?

example:
DataSet values
<CarMake>BMW</CarMake>
<CarMake>Mercedes</CarMake>
<CarMake>Ford</CarMake>
<CarMake>Chevy</CarMake>
<CarMake>Used</CarMake>

If <CarMake>Used</CarMake> exists I do not want to show it in my grid.
I cant change the stored procedure due to that value is used by another
application. So that option isn't happening. Is there any other way to
filter/hide that value?
 
I figured it out after I hit the send button.

DataView dv = new DataView(ds.tables[0]);
dv.RowFilter = "CarMake <> 'Used'";
 
Back
Top