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

Radgrid cell background color changes on sorting

2 Answers 525 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Richard M
Top achievements
Rank 1
Richard M asked on 18 Jun 2010, 12:48 AM

I have a checkbox in my RadGrid.  If that checkbox is checked, then I change the background color for that row in RadGrid1_ItemDataBound:

Protected Sub RadGrid1_ItemDataBound(ByVal sender As System.Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles RadGrid1.ItemDataBound

        'Change the color of inactive rows
        If TypeOf e.Item Is GridDataItem Then
            Dim item As GridDataItem = DirectCast(e.Item, GridDataItem)
            Dim chk_Status As CheckBox = DirectCast(item.FindControl("chk_Status"), CheckBox)
            If chk_Status.Checked = False Then
                e.Item.BackColor = Drawing.Color.RoyalBlue
            End If
        End If

End Sub

But if I click on any header column to sort that column, the cells in the alternating rows that are highlighted are not highlighted in the background color I specified. 

2 Answers, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 18 Jun 2010, 09:51 AM
Hello Richard,

Please set

<telerik:RadGrid>
    <SortingSettings EnableSkinSortStyles="false" />
</telerik:RadGrid>


Greetings,
Dimo
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Richard M
Top achievements
Rank 1
answered on 21 Jun 2010, 06:26 PM
That did it, Thanks!
Tags
Grid
Asked by
Richard M
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Richard M
Top achievements
Rank 1
Share this question
or