TDBAdvEdit ReadOnly True-False

Hi,

i have a strange regression problem.

1) I set to "True" the ReadOnly property of a data field

2) doing so, the readOnly property of the relative TDBAdvEdit component is correctly set to "True"

3) then, i revert to "False" the ReadOnly property of the data field

4) the readOnly property of the TDBAdvEdit remains "True"

Debugging the code, i arrive here

procedure TDBAdvEdit.CMEnter(var Message: TWMNoParams);
begin
  SetFocused(True);
  inherited;
  if Assigned(DataSource) and not FDataLink.CanModify then
    inherited ReadOnly := true;
end;

where i see that ReadOnly property is set to True on 2), but is not set to False on 4).

I don't know when this thing has introduced, but i'm sure that is some sort of regression bug, it was functioning before.

Thanks, ciao !

Arnaldo

I forgot to say that i use version 9.2.0.0 of VCL components.

Now i will install last version, to see if something changes. 

The reason is that users expect the TDBAdvEdit ReadOnly property overrides the DB field ReadOnly setting, i.e. DBAdvEdit.ReadOnly should have priority over DBField.ReadOnly = false.
We'll investigate if we can find a solution for your specific use case though.

Thank you Bruno,

now that i know the reason, it seems reasonable that it functions like that. I will try a workaround, no problem.

Thanks, ciao !

Arnaldo

We actually found a solution to be added for the component by detecting DB field level ReadOnly changes and handle this accordingly in TDBAdvEdit. This will be included in the next update.