diff --git a/lcl/dbctrls.pp b/lcl/dbctrls.pp index bfe1c62a9a..9058b6d2e1 100644 --- a/lcl/dbctrls.pp +++ b/lcl/dbctrls.pp @@ -1419,7 +1419,7 @@ end; function FieldIsEditable(Field: TField): boolean; begin result := (Field<>nil) and (not Field.Calculated) and - (Field.DataType<>ftAutoInc) and (not Field.Lookup) + (Field.DataType<>ftAutoInc) and (Field.FieldKind<>fkLookup) end; function FieldCanAcceptKey(Field: TField; AKey: char): boolean; diff --git a/lcl/dbgrids.pas b/lcl/dbgrids.pas index e3174ccef6..c82dc76c03 100644 --- a/lcl/dbgrids.pas +++ b/lcl/dbgrids.pas @@ -1230,7 +1230,7 @@ begin StartUpdating; try edField.Text := FTempText; - if edField.Lookup then + if edField.FieldKind = fkLookup then begin LookupKeyValues := Null; if edField.LookupCache then @@ -3267,7 +3267,7 @@ begin aField := SelectedField; if aField<>nil then begin Result := IsValidChar(AField, Ch) and not aField.Calculated and - (aField.DataType<>ftAutoInc) and (not aField.Lookup) and not aField.IsBlob; + (aField.DataType<>ftAutoInc) and (aField.FieldKind<>fkLookup) and not aField.IsBlob; end; end; end; @@ -3288,7 +3288,7 @@ begin result := not AField.CanModify; // if field is readonly, check if it's a lookup field - if result and AField.Lookup then begin + if result and (AField.FieldKind = fkLookup) then begin FieldList := TList.Create; try AField.DataSet.GetFieldList(FieldList, AField.KeyFields); @@ -4023,7 +4023,7 @@ end; function TColumn.GetPickList: TStrings; begin Result := inherited GetPickList; - if (Field<>nil) and FField.Lookup then + if (Field<>nil) and (FField.FieldKind=fkLookup) then begin if FField.LookupCache then FField.LookupList.ValuesToStrings(Result)