Looping through the container object in a datagrid?

Discussion in 'ASP .Net Web Controls' started by Oleg, Sep 10, 2003.

  1. Oleg

    Oleg Guest

    HI, all...

    I have a problem that I've been trying to solve for a couple of days
    now. First off - I have a datagrid which receives data from a
    dynamically composed dataset (i.e. every time there is a different
    number of COLUMNS in a dataset with different names, but are in
    sequencial order - column_name1, column_name2... and so on)

    What I want to do is format the layout of the datagrid using container
    object or any other formatting tool, but since my columns are
    dynamically named I can't say Container.DataItem("column_name"),
    because I don't know the column_name before hand... now if I could
    know how many COLUMNS there are in a container and loop through them
    creating the name inside a loop (i.e. adding an integer to the end of
    column_name is how my names are set up) ... and I can't find a way to
    see how many columns there are in the container.... is there a way to
    get that, or is there any other way to do it?

    Please help...

    Sincerely,
    Oleg
     
    Oleg, Sep 10, 2003
    #1
    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. Diva
    Replies:
    1
    Views:
    554
    S. Justin Gengo
    Jul 24, 2003
  2. Jim Heavey

    Looping Through Controls In DataGrid

    Jim Heavey, Dec 6, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    450
    Jim Heavey
    Dec 6, 2003
  3. Stephan Bour
    Replies:
    1
    Views:
    501
    Hermit Dave
    Dec 12, 2003
  4. Aaron
    Replies:
    2
    Views:
    577
    dhtml
    Apr 10, 2011
  5. Replies:
    5
    Views:
    304
Loading...

Share This Page