How do i: Change the header text in a datagrid that is databound?

Discussion in 'ASP .Net' started by John Blair, Jan 12, 2005.

  1. John Blair

    John Blair Guest

    Hi,

    I have tried aliasing columns in the SELECT statement - they get ignored.
    I have tried accessing the .columns(0).headertext - but as the grid is
    databound that column collection does not exist.

    Any help appreciated. Thanks.
    John Blair, Jan 12, 2005
    #1
    1. Advertising

  2. The only way is to handle ItemCreated event. Then you can catch headers as
    they get created and change the text.

    Eliyahu

    "John Blair" <> wrote in message
    news:_U7Fd.583$...
    > Hi,
    >
    > I have tried aliasing columns in the SELECT statement - they get ignored.
    > I have tried accessing the .columns(0).headertext - but as the grid is
    > databound that column collection does not exist.
    >
    > Any help appreciated. Thanks.
    >
    >
    Eliyahu Goldin, Jan 12, 2005
    #2
    1. Advertising

  3. John Blair

    John Blair Guest

    Thanks again!

    "Eliyahu Goldin" <> wrote in message
    news:OuKAvBK%...
    > The only way is to handle ItemCreated event. Then you can catch headers as
    > they get created and change the text.
    >
    > Eliyahu
    >
    > "John Blair" <> wrote in message
    > news:_U7Fd.583$...
    >> Hi,
    >>
    >> I have tried aliasing columns in the SELECT statement - they get ignored.
    >> I have tried accessing the .columns(0).headertext - but as the grid is
    >> databound that column collection does not exist.
    >>
    >> Any help appreciated. Thanks.
    >>
    >>

    >
    >
    John Blair, Jan 12, 2005
    #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. Jim Heavey

    Change Presentation of Databound Field

    Jim Heavey, Feb 14, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    400
    Jim Heavey
    Feb 15, 2004
  2. rodchar
    Replies:
    0
    Views:
    382
    rodchar
    Nov 26, 2007
  3. mlt
    Replies:
    2
    Views:
    820
    Jean-Marc Bourguet
    Jan 31, 2009
  4. Rajan

    Change header text in datagrid

    Rajan, Jul 4, 2004, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    133
    Rajan
    Jul 4, 2004
  5. Manu
    Replies:
    0
    Views:
    161
Loading...

Share This Page