Dynamic highlights

Hi
I am trying to create dynamic row colors based on the values in one of the columns. It seems the highlight dialog should be able to do this but I can't seem to figure out the necessary code. This is what I am trying to simulate:
For Each row As DataGridItem In dgGrid.Items

                Select Case [Computers.group]
                                 Case 1
                        row.BackColor = Drawing.Color.LightYellow
                    Case 2
                        row.BackColor = Drawing.Color.LightPink
                    Case 3
                        row.BackColor = Drawing.Color.LightGreen
                    
                End Select
            Next
Can someone tell me how to do this?
Thanks

Comments

  • edited 6:15AM
    Have you tired taking a look at the samples? I believe some of them showed how to highlight certain cells/rows. Take a look at the code for those samples and follow what they did.

Leave a Comment