stevegray
4Penny.net
Points: 66409

2/10/2026 1:23:19 PM

Change the background color of an entire row

This code details changing the background color of an entire row
4Penny.net
Version: All
Section: Telerik

 

Protected Sub RadGrid1_ItemDataBound(sender As Object, e As Telerik.Web.UI.GridItemEventArgs) Handles RadGrid1.ItemDataBound
    If TypeOf e.Item Is Telerik.Web.UI.GridDataItem Then
        Dim oItem As GridDataItem = e.Item
 
        'set the background color of the row pink if it is about to be archived
        Dim bArchiveWarning As Boolean = RadGrid1.MasterTableView.DataKeyValues(e.Item.ItemIndex)("ArchiveWarning")
        If bArchiveWarning Then
            oItem.BackColor = System.Drawing.Color.LightPink
        End If
End Sub

 

Please leave a comment

Add a Comment



Not Subscribed. You will not receive emails on article changes or comment additions

Comments

body header
No records to display.
Table Definition Quick Links
All Tables
SOP Tables
RM Tables
GL Tables
POP Tables
HR Tables
PM Tables
UPR Tables
IV Tables
Olympic Tables
3