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

[Solved] How to set sort column style

3 Answers 259 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Paweł
Top achievements
Rank 2
Paweł asked on 17 Mar 2009, 03:15 PM
Hi,

I would like to set style for whole column by which grid is sorted and also style for proper header element.
I found that you can set:
<SortingSettings SortedBackColor="#d0d0d0" /> 

but this is vary lame, since this doesn't allow you to set different color for alt row, not mentioning that you cannot use css styling :(

Is there a way to set this css style for column that we sort by, and for this column header?

Gr,
Pawel

3 Answers, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 17 Mar 2009, 03:52 PM
Hi Paweł,

RadGrid supports customizing sorted columns with CSS in the latest version - Q1 2009. The control actually has predefined sorted columns' styles for all embedded skins, as demonstrated here:

http://demos.telerik.com/aspnet-ajax/grid/examples/programming/sort/defaultcs.aspx

The CSS class, which is applied to sorted header and data cells is called rgSorted. You can distinguish the type of cell by its element or parent element and apply different styles, e.g.:

div.RadGrid_SkinName  th.rgSorted { }   - styles for header cells

div.RadGrid_SkinName  .rgRow  td.rgSorted { }  - styles for normal row cells

div.RadGrid_SkinName  .rgAltRow  td.rgSorted { }  - styles for alternating row cells


All the best,
Dimo
the Telerik team


Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Paweł
Top achievements
Rank 2
answered on 16 Apr 2009, 01:44 PM
Dimo,

It doesn't seam to work in Q3 (2008.3.1314.20).
Or do I need to set some grid property to activate it?

Pawel
0
Dimo
Telerik team
answered on 16 Apr 2009, 03:08 PM
Hello Paweł,

As I said in my previous message, you need RadControls Q1 2009.

Best wishes,
Dimo
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Grid
Asked by
Paweł
Top achievements
Rank 2
Answers by
Dimo
Telerik team
Paweł
Top achievements
Rank 2
Share this question
or