Hy all together
Whitch ist the best (shortest) way to format a row when a cell has a assigned value? For example, when the cell in the column Categorie is 3, i like to make the row red. Is the value 2 i like to make the row blue and when te value is 4, i like to have the row in gray.
Is this possible?
Thanks a lot for eany ideas.
GreatingsScampolo
You should be able to do what you want in the grid's InitializeRow event:
Protected
Sub grd_InitializeRow(ByVal sender As Object, ByVal e As Infragistics.WebUI.UltraWebGrid.RowEventArgs) Handles grd.InitializeRow
Select Case e.Row.Cells.FromKey("Categorie").Value
Case 2
e.Row.Style.BackColor = Drawing.Color.Blue
Case 3
e.Row.Style.BackColor = Drawing.Color.Red
Case 4
e.Row.Style.BackColor = Drawing.Color.Gray
Case Else
'if want to change default color, do so here
End Select
End Sub
Hi, thanks very mutch, it works fine.