Column HeaderText set at runtime?

Discussion in 'ASP .Net Datagrid Control' started by Mark A Gregory, Jul 19, 2003.

  1. I have tried to put a string in the codebehind and to load this at runtime,
    but it does not seem to work.
    I would appreciate ideas on how to load the Column HeaderText from a
    dataset. This dataset is
    different than the one that datagrid is bound to.

    <asp:BoundColumn DataField="strPosition1" SortExpression="strPosition1"
    ReadOnly="True" HeaderText="<%= strHeaderText1 %>"></asp:BoundColumn>

    in the code behind I have

    protected string strHeaderText1 = "Test";

    thank you
    mark
    Mark A Gregory, Jul 19, 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. =?Utf-8?B?QWxlc3NhbmRybyBSb3NzaQ==?=

    Set Column Headertext

    =?Utf-8?B?QWxlc3NhbmRybyBSb3NzaQ==?=, Feb 27, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    327
    Martin Dechev
    Feb 27, 2004
  2. =?Utf-8?B?bWc=?=

    Set headertext in datagrid programatically

    =?Utf-8?B?bWc=?=, May 26, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    1,342
    Alvin Bruney [MVP]
    May 27, 2004
  3. John E.
    Replies:
    4
    Views:
    4,646
    John E.
    Oct 14, 2004
  4. John Mason
    Replies:
    0
    Views:
    859
    John Mason
    Aug 20, 2006
  5. Ravi Gudlavalleti

    How do I change the headertext of a datagrid column programmatically

    Ravi Gudlavalleti, Jun 17, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    1
    Views:
    206
    Ken Cox [Microsoft MVP]
    Jun 18, 2004
Loading...

Share This Page