Question

Currently there is a column in my grid that changes background colors when a the grid sort event is called. The bg color changes depending upon the integer value within the cell. Right now it does this with a for loop and has to go through each row and locate the particular cell and check the value. Unless It must execute this bit of code each time the rows are sorted otherwise they go back to default color. I'm looking for a way to write some code that will permanently set the background color of these cells upon creation when the grid is first loaded so that it doesn't have to be set each time a column header is clicked and the data is sorted.

No correct solution

OTHER TIPS

Solution to this was to the DataGridView.CellFormating Event Handler.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top