FieldAsColor in rDBgrid

22 views
Skip to first unread message

RuGaDelphi

unread,
Jul 13, 2022, 7:45:58 AM7/13/22
to Rosi Delphi Components
hi,
i have a DB column for colors like $FF0000 for Blue.
i added the column name to fieldsAsColor stringlist.
The color is shown in Table but i get no Picklist and no ColorPicker for fields.
what do i need to do?

Tomas Rosinsky

unread,
Jul 18, 2022, 7:00:02 AM7/18/22
to Rosi Delphi Components
Hello,
it looks you updated property FieldsAsColor in runtime after dataset activation, then PickList is not initialized correctly (in the current version picklist is loaded in DatasetActivation event and only if FieldsAsColor is not empty).

I will fix it in the next version. In meantime you can set the property before dataset activation or call procedure LoadColorPickList after setting (you have to use hack component as the procedure is protected).

Example:

type
  THackrDBGrid = class(TrDBGrid)
  end;
...
MyGrid.FieldsAsColor.Add('MyField');
THackrDBGrid(MyGrid).LoadColorPickList;
... 


I hope it helps
Tomas

Dne středa 13. července 2022 v 13:45:58 UTC+2 uživatel RuGaDelphi napsal:
Reply all
Reply to author
Forward
0 new messages