This is a migrated thread and some comments may be shown as answers.

Underline only sortable columns using css (common place) in RadGrid

2 Answers 83 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ravishankar
Top achievements
Rank 1
Iron
Ravishankar asked on 08 Nov 2016, 06:47 PM
I am working on RadGrid. Somehow not able to find a css to distinguish sortable and non-sortable column. I need this because I wanted to underline only sortable columns.

2 Answers, 1 is accepted

Sort by
0
Accepted
Eyup
Telerik team
answered on 11 Nov 2016, 03:46 PM
Hi Ravishankar,

For sortable columns the grid generates a link element:
<th scope="col" class="rgHeader"><a onclick="Telerik.Web.UI.Grid.Sort($find('RadGrid1_ctl00'), 'ShipName'); return false;" title="Click here to sort" href="javascript:__doPostBack('RadGrid1$ctl00$ctl02$ctl02$ctl01','')">ShipName</a></th>

While for unsortable columns it is just plain text:
<th scope="col" class="rgHeader">Freight</th>

Therefore, you can use this when adding the CSS rule:
div.RadGrid .rgHeader a {
    color: forestgreen;
}

That should do the trick.

Regards,
Eyup
Telerik by Progress
Check out the new UI for ASP.NET Core, the most complete UI suite for ASP.NET Core development on the market, with 60+ tried-and-tested widgets, based on Kendo UI.
0
Ravishankar
Top achievements
Rank 1
Iron
answered on 11 Nov 2016, 04:37 PM

Thanks.

Tags
Grid
Asked by
Ravishankar
Top achievements
Rank 1
Iron
Answers by
Eyup
Telerik team
Ravishankar
Top achievements
Rank 1
Iron
Share this question
or