I have been trying to make a db-aware edit control for the lcl and getting nowhere and its as far as I can tell because Field.GetCanModify is always false so it is never editable. Looking through the fcl sources I find this function -
function TField.GetCanModify: Boolean;
begin
Result:=Not ReadOnly;
If Result then
begin
Result:=Assigned(DataSet);
If Result then
Result:=Not(DataSet.CanModify);
end;
end;and since Datset.CanModify is almost always going to be true, if editing then this always validates false. in fact right now that function always returns true anyway. so this will always be wrong. I think it should be
If Result then
Result:= DataSet.CanModify;I worked passed this for now by using my own routine which does the test like this and it works fine for me.
Andrew
