Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > remove data value from dataset

Reply
Thread Tools

remove data value from dataset

 
 
=?Utf-8?B?Q1NoYXJwZ3V5?=
Guest
Posts: n/a
 
      08-17-2006
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?

 
Reply With Quote
 
 
 
 
=?Utf-8?B?Q1NoYXJwZ3V5?=
Guest
Posts: n/a
 
      08-17-2006
I figured it out after I hit the send button.

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


"CSharpguy" wrote:

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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error when changing data value in strongly typed dataset table? Keithb ASP .Net 1 10-25-2006 09:52 AM
how do I remove extra data from serialize XML string of a DataSet IMS.Rushikesh@gmail.com ASP .Net Web Services 1 09-07-2005 04:20 PM
Remove row with null value from DataSet?? LunchBox ASP .Net 0 12-04-2003 06:08 PM
Remove row with null value from DataSet?? LunchBox ASP .Net Web Services 0 12-04-2003 04:27 PM
Ccopying a datatable content from an untyped dataset into a table which is inside a typed dataset Nedu N ASP .Net 1 10-31-2003 02:39 AM



Advertisments