Hi Uli,
currently it can be defined just by custom code anyway I plan to implement also design time setting to next version.
Example of solution for sg4 and field Title:
event OnGetEditStyle
procedure TrDBStringGridEdTest.sg4GetEditStyle(Sender: TObject; Col,
Row: Integer; var EditStyle: TrStringGridEdEditStyle);
var d: TrDBStringGridEdMultiRow;
begin
d:=sg4.GetCellMultiRowDef(Col, Row);
if Assigned(d) then
begin
if SameText(d.FieldName,'Title') then
EditStyle:=sgbDropDown;
end;
end;
event OnPicklistDropdown
procedure TrDBStringGridEdTest.sg4PicklistDropdown(Sender: TObject; Col,
Row: Integer; var PickList: TStringList);
var d: TrDBStringGridEdMultiRow;
begin
d:=sg4.GetCellMultiRowDef(Col, Row);
if Assigned(d) then
begin
if SameText(d.FieldName,'Title') then
PickList.Assign(MyList);
end;
end;
I hope it helps.
Best regards
Tomas
Dne pátek 21. března 2025 v 13:36:11 UTC+1 uživatel Ulrich Schaupp napsal: