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

Sorted Column: backgroundcolors for regular and alternate rows

3 Answers 145 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Oscar Emiliano
Top achievements
Rank 1
Oscar Emiliano asked on 28 May 2014, 02:58 PM
Greetings,

I was wondering if it is possible to set 2 background colors for sorted columns, one color for alternate rows and other for non-alternate rows, because for the moment I only found the property SortedBackColor in SortingSettings. 

I would like to achieve this to keep the alternate look and feel among rows even on sorted columns.

Thanks in advance for your help

Regards!
Oscar Rmz

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 29 May 2014, 07:10 AM
Hi,

Please try the below CSS to style different background color for alternate rows and non-alternate rows of a sorted column.

CSS:
.RadGrid_Default .rgAltRow .rgSorted
{
    background-color: Orange !important;
}
.RadGrid_Default .rgSorted
{
    background-color: Gray !important;
}

Thanks,
Shinu.
0
Oscar Emiliano
Top achievements
Rank 1
answered on 29 May 2014, 01:44 PM
Hi Shinu,

Thanks for your reply, I tried the code you provided me and it works, but seems that there is another conflict. On my RadGrid, I enabled the Select row option and when I select a record the top middle of the row remains with the color set by your code. I'm attaching a screenshot so this could be more clear (the selected row is "Darril & Son" and of course the grid is sorted by that column).

Thanks in advance
Oscar 
0
Shinu
Top achievements
Rank 2
answered on 30 May 2014, 06:02 AM
Hi,

Unfortunately I couldn't replicate the issue at my end. Please provide your full code and please mention your Telerik version also.

Thanks,
Shinu.
Tags
Grid
Asked by
Oscar Emiliano
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Oscar Emiliano
Top achievements
Rank 1
Share this question
or