DataGrid Sort Column HeaderStyle

Discussion in 'ASP .Net' started by Guest, Apr 29, 2005.

  1. Guest

    Guest Guest


    I am using the following CSS class for the DataGrid Head column wherein i am
    sorting the recrods. The style works fine.. By default it puts an underline
    for each header column. The underlin should be there except for the sorted

    Can anyone help me out.

    CSS Class :

    ...grdHeaderClass, grdHeaderClass td, .grdHeaderClass a, .grdHeaderClass
    a:link, .grdHeaderClass a:visited, .grdHeaderClass a:hover
    { }
    Guest, Apr 29, 2005
    1. Advertisements

  2. Baren then apply the correct CSS:-
    text-decoration: none
    Hope it helps
    Patrick Olurotimi Ige, Apr 29, 2005
    1. Advertisements

  3. One approach might be to add a style="text-decoration:none;" attribute
    to the column header that is selected. The best way would to do this
    would be to add a OnItemDataBound handler to your DataGrid. In this
    method, check to see if the HeaderTemplate is being databound. If it
    is, find the column that is currently the sort-order column and add
    the css as above.

    Let me know if you need more details, but that should get you started.

    Roger Helliwell, Apr 29, 2005
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.