Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
170
How do I get Row.Appearance to take precidence over Cell.Appearance
posted

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

Parents
No Data
Reply
  • 469350
    Offline posted

    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?

Children