Dynamic highlights

edited 11:40PM in FastReport .NET
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 11:40PM
    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

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.