Hi.
How could I easily get 'cumulative' appearance of cell? For example, I'd like to get ForeColor, BackColor and Font settings by right-clicking on column. The problem is that ForeColor could be decalred on grid level, BackColor on band level so in this calse UltraGridColumn.CellAppearance properties do not return actual values.
There is a ResolveApperance method on a cell that you can use to get this information, i.e.:
AppearanceData appearance = new AppearanceData();AppearancePropFlags requestedProps = AppearancePropFlags.BackColor | AppearancePropFlags.ForeColor | AppearancePropFlags.FontData;cell.ResolveAppearance(ref appearance, requestedProps);
-Matt
Thanks Matt! That is what I'm looking for!
Do you mean that you want the appearance of the header? Or only just the appearance of all cells in that column? I don't think that there's any way to resolve a cell appearance for the column itself, since the column only applies a portion of what is calculated during the appearance resolution phase; also, the column isn't responsible for rendering the cells. If you need to get what a cell would look like in that column, without taking into account row-specific (or cell-specific) settings, you would have to resolve the appearance yourself, taking into account the column, band-level override, and grid-level override settings.
If you just need to resolve what the header looks like, there is a column.Header.ResolveAppearance method.
Another question: how to do the same but for Column. There is a CellAppearance property. How could I get it 'cumulative'? It looks like there is no ResolveAppearance method on UltraGridColumn.