Formatting Priority Order in RadGridView
Environment
Product Version | Product | Author |
---|---|---|
2022.2.622 | RadGridView for WinForms | Desislava Yordanova |
Description
All controls built on top of the Telerik Presentation Framework have default style coming from the applied theme. Note that the different themes offer a different design which can be achieved by applying different style settings of the respective inner elements. Hence, when applying one set of style settings programmatically, it may work for one theme but it may not work the same way for another theme.
Since RadGridView offers different ways for styling the row and cell elements, this article gives more information about the priority order of the different styling approaches.
Solution
Firstly, the style related to the row elements is applied, then to the cell elements. The cell's Style property has a higher priority than the applied cell style settings in the ConditionalFormattingObject. The CellFormatting event has highest priority among all of them.
Here is the order (lowest to highest) of applying the style settings:
1. ConditionalFormattingObject.RowBackColor (when ApplyToRow=true)
3. ConditionalFormattingObject.CellBackColor