Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Datagrid Control > Manipulating Dataset

Reply
Thread Tools

Manipulating Dataset

 
 
Hai
Guest
Posts: n/a
 
      10-08-2004
Dear gurus,

I have a stored procedure which returns a set of rows.

How do I suppress a number of columns (not display) from dataset?
Is is DataSet is the right tool in this case?

Thank you.

Hai


 
Reply With Quote
 
 
 
 
Hai
Guest
Posts: n/a
 
      10-11-2004
Hello Jared,

Thank you very much but it did not seem to work or because I did not get
the syntax correct.

Hai

"Jared" <> wrote in message
news:...
> Hai,
> Before you bind the dataset, you can mark the columns as hidden. I
> haven't tried this code, but, it works on the WinForms datagrid. If you
> aren't going to use the hidden results of the stored procedure you should
> probably create a procedure that only returns the columns you need, it's
> probably a better option.
> HTH,
> Jared
>
> Dim ds As DataSet
> For Each col As DataColumn In ds.Tables(0).Columns
> Select Case col.ColumnName
> Case Is = "Hideme", "HideMeToo", "DontDisplay"
> col.ColumnMapping = MappingType.Hidden
> End Select
> Next
>
> "Hai" <> wrote in message
> news:%...
> > Dear gurus,
> >
> > I have a stored procedure which returns a set of rows.
> >
> > How do I suppress a number of columns (not display) from dataset?
> > Is is DataSet is the right tool in this case?
> >
> > Thank you.
> >
> > Hai
> >
> >

>
>



 
Reply With Quote
 
 
 
 
Hai
Guest
Posts: n/a
 
      10-12-2004
Jared,
Fantastic.
Thanks a lot

Hai

"Jared" <> wrote in message
news:...
> Hai,
> Like I said before, I haven't tried the code on a webforms datagrid
> before. I did find an article that states you cannot hide autogenerated
> columns in a web forms datagrid. There is an example that will produce the
> results you want.
> http://authors.aspalliance.com/aldot...mnarticle.aspx
> Jared
>
> "Hai" <> wrote in message
> news:...
> > Hello Jared,
> >
> > Thank you very much but it did not seem to work or because I did not

get
> > the syntax correct.
> >
> > Hai
> >
> > "Jared" <> wrote in message
> > news:...
> >> Hai,
> >> Before you bind the dataset, you can mark the columns as hidden. I
> >> haven't tried this code, but, it works on the WinForms datagrid. If you
> >> aren't going to use the hidden results of the stored procedure you

should
> >> probably create a procedure that only returns the columns you need,

it's
> >> probably a better option.
> >> HTH,
> >> Jared
> >>
> >> Dim ds As DataSet
> >> For Each col As DataColumn In ds.Tables(0).Columns
> >> Select Case col.ColumnName
> >> Case Is = "Hideme", "HideMeToo", "DontDisplay"
> >> col.ColumnMapping = MappingType.Hidden
> >> End Select
> >> Next
> >>
> >> "Hai" <> wrote in message
> >> news:%...
> >> > Dear gurus,
> >> >
> >> > I have a stored procedure which returns a set of rows.
> >> >
> >> > How do I suppress a number of columns (not display) from dataset?
> >> > Is is DataSet is the right tool in this case?
> >> >
> >> > Thank you.
> >> >
> >> > Hai
> >> >
> >> >
> >>
> >>

> >
> >

>
>



 
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
DataSet and dataSet JimO ASP .Net 2 03-08-2006 02:39 PM
copying a datatable content from an untyped dataset into a table which is inside a typed dataset Nedu N ASP .Net 2 10-31-2003 01:05 PM
Ccopying a datatable content from an untyped dataset into a table which is inside a typed dataset Nedu N ASP .Net 2 10-31-2003 02:42 AM
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
DataSet to DataSet Joseph D. DeJohn ASP .Net 1 08-04-2003 03:25 AM



Advertisments