Fix: TJDBGridControl AV in design mode

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2063 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
jujibo
2011-10-05 10:09:04 +00:00
parent 2565275b1b
commit a669e9886b

View File

@@ -159,10 +159,13 @@ begin
if Result <> nil then if Result <> nil then
begin begin
C := ColumnFromGridColumn(Column); C := ColumnFromGridColumn(Column);
if C <> nil then
begin
bs := C.ButtonStyle; bs := C.ButtonStyle;
aField := GetFieldFromGridColumn(Column); aField := GetFieldFromGridColumn(Column);
if (aField <> nil) and (bs = cbsAuto) then if (aField <> nil) and (bs = cbsAuto) then
begin begin
writeln(aField.DataType);
case aField.DataType of case aField.DataType of
ftSmallint, ftInteger: ftSmallint, ftInteger:
Result := integerDbGridControl.Editor(Self); Result := integerDbGridControl.Editor(Self);
@@ -183,6 +186,7 @@ begin
end; end;
end; end;
end; end;
end;
procedure TJDBGridControl.UpdateData; procedure TJDBGridControl.UpdateData;
begin begin