In unit "cxGridCustomTableView.pas", class "TcxCustomGridTableViewStyles", there are various methods for returning style parameters, e.g.
These are all virtual methods which I have successfully overridden in decendant classes.
However, the method called "GetSelectionParams" is not virtual. Please can you considermaking it virtual?
"GetDataCellParams" calls both "GetSelectionParams" and "GetDataCellContentParams". One is virtual the other is not. I have worked around this by overriding "GetDataCellParams" and duplicated your code but it would be good if you could make "GetSelectionParams" virtual in the future.
We introduced a new TableView event which indicates if a cell is enabled or not. Various factors can affect this at run-time. If a cell is NOT enabled, we change the colour of the cell to the disabled colour which indicates the cell cannot be edited.
This behaviour must override the built in styles.
Therefore, we override "GetDataCellContentParams" (and want to override "GetSelectionParams") to call our event and determine the enabled state before the style is set.
AEnabled := <Call Event to determine enabled state based on ARecord and AItem)
if not AEnabled then AParams.Color := <UseDisabledColor>;
Is your intention to post an answer to your own question?
- If so, then proceed.
- If you simply wanted to post additional information, ask for further clarification, or to just say "Thanks!", please click Leave a Comment.
- If you wish to edit your original question, please use the Edit button in the Toolbox at the top right corner of that entry.