Manipulating Dataset

Discussion in 'ASP .Net Datagrid Control' started by Hai, Oct 8, 2004.

  1. Hai

    Hai Guest

    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
    Hai, Oct 8, 2004
    #1
    1. Advertising

  2. Hai

    Hai Guest

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

    >
    >
    Hai, Oct 11, 2004
    #2
    1. Advertising

  3. Hai

    Hai Guest

    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/aldotnet/examples/hidecolumnarticle.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
    > >> >
    > >> >
    > >>
    > >>

    > >
    > >

    >
    >
    Hai, Oct 12, 2004
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Nedu N
    Replies:
    1
    Views:
    1,772
    Chris Taylor
    Oct 31, 2003
  2. JimO

    DataSet and dataSet

    JimO, Mar 1, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    506
    Mary Chipman [MSFT]
    Mar 8, 2006
  3. Joseph D. DeJohn

    DataSet to DataSet

    Joseph D. DeJohn, Aug 4, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    381
  4. Nedu N
    Replies:
    2
    Views:
    2,138
  5. William Gower
    Replies:
    2
    Views:
    4,110
    Brian Baker [MVP]
    Jul 26, 2004
Loading...

Share This Page