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
Hi M,
The way appearance resolution works is that the more specific appearance always takes precedence over the less specific one. In this case, a cell is more specific than a row, so the cell appearance takes precedence.
This is very powerful in that it allows you to set appearances on a large scale and override it on a small scale. You can set the BackColor of every cell in the grid by setting a single property and then set the BakColor of the cells in a spefic band with another property. Then you can change a single row with one property, and a single cell, etc. It avoids the need for looping through large lists of objects to assign colors to big areas while still giving you fine control over each object.
If you want the row color to apply to a cell, then the thing to do is... don't set the color on the cell. Why would you set a color on the cell if you don't want to see it, anyway?
Thanks for the response.
That does make sense for sure, but I want to set the color at a column level and have the row level override that. But there isnt a "column" level to set it at, which leaves me at the "cell" leve which is lower than a "row" and doesnt work.
Any thoughts on how I can make a column all one color except when it is overwritten by a row color change?
Thanks again