From a earlier post, I read that the Appearance set in code take precedence over the AppStylist setting. I have not spent time working with AppStylist but as I understand if affects the Appearance objects for the cells
In my grid, some cells need to have certain display attributes different relative to other cells. For example, some cell need bold fonts but the other attributes should be what AppStylist decides. In other cases, I want different foreground color for text but other attributes as set by AppStylist.That way when the AppStylist is used, it would affect the default look of the cell while the code would apply the special attributes to those cell relative to that default look.
Possible?
Thanks!
The appearance of a cell is resolved through a very robust process. The cell looks at it's own appearance, then the CellAppearance of the column, then the CellAppearance of the Row, then it takes into account the selected or active state, and then when you add AppStylist into it, it becomes quite mind-boggling.
But what you are describing here is very easy. The Appearance resolution only resolves properties that have actually been set. So if you set a cell.Appearance.ForeColor, then only the forecolor is resolved. If the BackColor is not set, it will get resolved by some other appearances further up the chain.
I am also looking at setting different call appearence properties based on the value in another cell. My issue seems to be getting the proper object.
My plan was to loop through the cells in the InitializeRow event, but I have not been able to get the proper syntax.
Can you provide an example of setting appearence properties of a cell based on another cell?