문제

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.

올바른 솔루션이 없습니다

다른 팁

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top