[Lazarus] The db-aware controls allow editing a readonly-dataset
Michael Van Canneyt
michael at freepascal.org
Thu Nov 27 22:37:00 CET 2008
On Thu, 27 Nov 2008, Joost van der Sluis wrote:
> Hi all,
>
> When a dataset is read-only, the db-aware controls allow editing. The
> changes aren't send to the dataset, though. Which is very confusing for
> the user.
>
> I don't know how to fix it. I can change TDatalink.ReadOnly so that is
> checks if the dataset is ReadOnly. But, for exmple, TDBEdit.Readonly
> directly passes the result of TDatalink.Readonly. And I checked with
> Delphi and there TDBEdit.Readonly is false, even if the TDataset is
> readonly.
That is because the readonly is the TCustomEdit.ReadOnly, no ?
You can set a edit read-only, even if the field is read-write, so
this is normal in my eyes.
But if the TDataset is readonly then the edit should of course also
give readonly=True.
> Alternative is to check in TDBEdit.IsReadOnly and relatives...
? Please explain ?
Michael.
More information about the Lazarus
mailing list