DataGrid dynamic columns

Discussion in 'ASP .Net' started by =?Utf-8?B?Sm9u?=, Feb 16, 2006.

  1. Hello all,

    If I have a datagird with a number of columns, say 3, and then I add another
    one dynamically, obviously it will have no data, what's the best way to get
    the data, do I have to rebind?

    Thanks all,

    Jon
     
    =?Utf-8?B?Sm9u?=, Feb 16, 2006
    #1
    1. Advertising

  2. Jon wrote:
    > Hello all,
    >
    > If I have a datagird with a number of columns, say 3, and then I add
    > another one dynamically, obviously it will have no data, what's the
    > best way to get the data, do I have to rebind?
    >

    Yes.

    --
    Microsoft MVP -- ASP/ASP.NET
    Please reply to the newsgroup. The email account listed in my From
    header is my spam trap, so I don't check it very often. You will get a
    quicker response by posting to the newsgroup.
     
    Bob Barrows [MVP], Feb 16, 2006
    #2
    1. Advertising

  3. Jon wrote:
    > Hello all,
    >
    > If I have a datagird with a number of columns, say 3, and then I add
    > another one dynamically, obviously it will have no data, what's the
    > best way to get the data, do I have to rebind?
    >

    Of course, you could loop through the roes and populate the cells yourself
    ....

    --
    Microsoft MVP -- ASP/ASP.NET
    Please reply to the newsgroup. The email account listed in my From
    header is my spam trap, so I don't check it very often. You will get a
    quicker response by posting to the newsgroup.
     
    Bob Barrows [MVP], Feb 16, 2006
    #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. J.B
    Replies:
    1
    Views:
    2,592
    Natty Gur
    Oct 23, 2003
  2. Jordo
    Replies:
    0
    Views:
    457
    Jordo
    Oct 31, 2003
  3. avnrao
    Replies:
    3
    Views:
    3,669
    Elad Volpin
    Jun 6, 2004
  4. rob thomson
    Replies:
    0
    Views:
    269
    rob thomson
    Sep 4, 2003
  5. ton
    Replies:
    2
    Views:
    207
    Alvin Bruney [MVP]
    Feb 11, 2004
Loading...

Share This Page