remove data value from dataset

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?
 
G

Guest

I figured it out after I hit the send button.

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top