I am setting cellappearance.backcolor of cells at design time, essentially highlighting a column in the grid. But I am setting row.appearance.backcolor in InitializeRows which I would like to replace the cell back color, but its not.
Is there a switch or something that I can flip to cause the row appearance to take precidence over the cell appearance?
Thanks
M
Ah yes, I see what you are getting at.
That works perfect, that was exactly what I wanted.
Thanks for you help
Hi M,
No, you do not have to loop through the cells. I was not suggesting that you use the appearance on each Cell. I suggested that you use the row.CellAppearance. This appearance applies to every cell in the row and this appearance takes precedence over the column.CellAppearance.
The row has an Appearance property which applies to the row itself. It also has a CellAppearnce which applies to every cell in that row. It's a subtle, but important, distinction.
Did you try it?
Which is great for settting the backcolor of a "cell" but not a "row" I have 50+ columns that maybe visible or invisible based on user settings. I guess I could iterate through them setting them one at a time at every refresh to set the cell back color. Isnt there anything a little simpler? Seems like excessive processing, unless that is how it is done internally anyway.
The same way you do it with the Appearance on the Row or the CellAppearance on the ColumnHeader.
row.CellAppearance.BackColor = color
How do I use CellAppearance to alter the entire rows backcolor?