Losing sortability when changing header text

Discussion in 'ASP .Net Datagrid Control' started by Jacques Leclerc, Aug 18, 2005.

  1. I've got a datagrid on a webform. The sortable attribute is set within the
    <asp:DataGrid> tag on the aspx file. An intial value is also set for the
    column header text.

    In the code behind page in the ItemDataBound event I reset the header text
    based on a user selection criteria. The setting of the header text is
    accomplished with the following code.
    e.Item.Cells(0).Text = "<p>Donation Group</p>"

    The column displays the new header text but the sortability for that column
    is lost.

    Does anyone know the correct syntax for changing the header text without
    losing the sortability?

    Thanks
     
    Jacques Leclerc, Aug 18, 2005
    #1
    1. Advertisements

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

    Changing datagrid header text

    Herry, Mar 8, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    3,349
    Herry
    Mar 8, 2005
  2. Ken McCrory

    Text box losing most recent Text value

    Ken McCrory, Mar 9, 2005, in forum: ASP .Net
    Replies:
    5
    Views:
    650
    Patrick Olurotimi Ige
    Mar 10, 2005
  3. Luis Esteban Valencia
    Replies:
    0
    Views:
    658
    Luis Esteban Valencia
    Mar 23, 2005
  4. fredd00

    changing the gridview header text

    fredd00, Mar 8, 2007, in forum: ASP .Net
    Replies:
    8
    Views:
    2,601
    fredd00
    Mar 9, 2007
  5. Replies:
    0
    Views:
    764
  6. mlt
    Replies:
    2
    Views:
    1,153
    Jean-Marc Bourguet
    Jan 31, 2009
  7. hansiman

    Image in header column (not replacing column header text)

    hansiman, Feb 5, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    3
    Views:
    506
    hansiman
    Feb 7, 2004
  8. Jason C
    Replies:
    4
    Views:
    915
    Morty Abzug
    Jun 26, 2012
Loading...