Hi,
I've got a WebDataGrid (v12.2), and I need to alternately change the background color on specific rows based on data that may be in one of the cells after the data is bound to the grid. I think I need to do this in the InitializeRow event of the grid, as some other formatting I've been able to apply to columns works great in there, but I haven't been able to come up with the right combination on the row end of things.
Any help would be appreciated!
For bonus points, if anybody knows how to highlight an entire row when the mouse is hovering over it, that would be great too.
thanks,Jeff Balcerzak
Hi Jeff,
I wanted to know if you were able to solve your issue based on these suggestions or you still need help. Please let me know.
The first could be achieved with the following code:
For the second you could use:
This is a possible way to achieve the desired behavior.
I have also attached a small sample project which demonstrates the above.
Please feel free to let me know if a question about our tool set comes up on your mind.
Hi Boris,
I like that sample, but is there a way to change the background color of the cell/row and not the foreground color?
Also, using the pre-render event, is there a way to change the background color of a specific row based on data contained in one of the cells?
thanks,
Jeff
Hello Jeff,
Could you please review the sample attached to this post and see if it meets your requirements. Please feel free to let me know if I misunderstood you or if you have any other questions.