Cell Style Evaluation Order
In This Topic
The following list defines the order in which cell styles are applied relative to the anonymous styles of a grid, split, or column:
- Style property, C1TrueDBGrid control. The default named parent of this anonymous style is Normal.
- Style property, Split object. By default, this anonymous style inherits from its C1TrueDBGrid control counterpart.
- EvenRowStyle and OddRowStyle properties, Split object. By default, these anonymous styles inherit from their C1TrueDBGrid control counterparts, which in turn have default named parents of EvenRow and OddRow. These properties apply only if the AlternatingRows property is True.
- Style property, C1DisplayColumn object. By default, this anonymous style inherits from its Split object counterpart.
- FetchRowStyle event. This event fires only if the FetchRowStyles property is True for a grid or split.
- SelectedStyle property, Split object. By default, this anonymous style inherits from its C1TrueDBGrid control counterpart, which in turn has a default named parent of Selected. This property applies only to selected rows; that is, rows whose bookmarks have been added to the SelectedRowCollection through code or user interaction.
- HighlightRowStyle property, Split object. By default, this anonymous style inherits from its C1TrueDBGrid control counterpart, which in turn has a default named parent of HighlightRow. This property applies only to highlighted rows, the current row in a grid or split whose MarqueeStyle property is set to MarqueeEnum.HighlightRow or MarqueeEnum.HighlightRowRaiseCell.
- AddCellStyle and AddRegexCellStyle methods, if called. Cell styles specified at the C1DisplayColumn object level have the highest priority, followed by those specified at the Split object and C1TrueDBGrid control levels. Within an object level, cell styles are tested in the order in which they were added in code. Cell styles do not inherit from one another; as soon as a match is found, testing stops.
- FetchCellStyle event. This event fires only if the FetchStyle property is True for a C1DisplayColumn object.
Thus, you always have final control over the rendering of a cell via the FetchCellStyle event.