mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-04 04:37:35 +01:00
LCL, dbgrid, Do not only check if a column is readonly, but also if the underlying field is modifyable, from Joost, issue #13177
git-svn-id: trunk@18720 -
This commit is contained in:
parent
9f72e7685a
commit
4a1a208473
@ -2490,10 +2490,16 @@ begin
|
||||
end;
|
||||
|
||||
function TCustomDBGrid.EditorIsReadOnly: boolean;
|
||||
var
|
||||
AField : TField;
|
||||
begin
|
||||
Result := inherited EditorIsReadOnly;
|
||||
if not Result then begin
|
||||
Result := not FDataLink.Edit;
|
||||
AField := GetFieldFromGridColumn(Col);
|
||||
if assigned(AField) then
|
||||
Result := not AField.CanModify;
|
||||
if not result then
|
||||
Result := not FDataLink.Edit;
|
||||
EditingColumn(Col, not Result);
|
||||
end;
|
||||
end;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user