Data grid title button attributes
Delphi 10.4 + latest Firepower.
Is it possible to change the color of a grid title button. As a user presses a title button I set that column readonly = false (all other columns readonly = true) so I need to do this to indicate which column is able to be edited. Another option would be to set and activate an icon to visible on a clicked button but can't seem to find any examples to do any of this.
The app is being built for iOS and uses a style.
Any help would be appreciated.
thanks
Bill Zwirs
-
I would use the OnCustomDrawCell event. For instance the following changes the background color to yellow for the buyer column.
procedure TDataGridControlsForm.wwDataGrid1CustomDrawCell(Sender: TObject; CellAttributes: TwwCustomDrawCellAttributes); begin if (cellattributes.DataRow<0) and (cellattributes.Column<>nil) and (cellattributes.Column.FieldName='Buyer') then cellattributes.BackColor:= TAlphaColorRec.Yellow; end;
Please sign in to leave a comment.
Comments
1 comment