LCL, corrects grids editing, from C. Western, issue #15025

git-svn-id: trunk@22494 -
This commit is contained in:
jesus 2009-11-09 03:08:10 +00:00
parent be07ff95be
commit 4d743bce3e

View File

@ -6299,8 +6299,8 @@ function TCustomGrid.EditingAllowed(ACol: Integer = -1): Boolean;
var
C: TGridColumn;
begin
Result:=(goEditing in options);
if Result and (ACol>=0) and (ACol<ColCount) then begin
Result:=(goEditing in options) and (ACol>=0) and (ACol<ColCount);
if Result and Columns.Enabled then begin
C:=ColumnFromGridColumn(ACol);
Result:=(C<>nil) and (not C.ReadOnly);
end;