DBGrid: allow editing of lookup columns via picklist
Original Reporter info from Mantis: Ask
-
Reporter name: Alexander S. Klenin
Original Reporter info from Mantis: Ask
- Reporter name: Alexander S. Klenin
Description:
Attached patch allows user to edit lookup fields in DBGrid, in a
manner similar to Delphi.
Additional information:
However, it has some problems/limitations, so please review:
-
The patch contains an ugly hack to access TLookupList's internal
representation.
It is, of course, much cleaner to modify the TLookupList definition,
but such a change would increase FPC version requirement, which is
IIUC unacceptable.
What is the current protocol of introducing such changes in Lazarus? -
It works only for the case of LookupCache = true.
Uncached lookups could be added easily enough, but I am afraid the
performance will suffer.
Anyway, this may be decided later and separately. -
The selection of LookupKey value depends on uniqueness of
LookupResultField's value.
If there are few records with the same LookupResultField, first one is picked.
This problem is hard to avoid, since user can simply enter
LookupResult value into the field
instead of picking it from the list.
Anyway, duplicated LookupResults if IMO a developer's mistake, so this
is not too important.
Mantis conversion info:
- Mantis ID: 12347
- Version: 0.9.27 (SVN)
- Fixed in version: 0.9.27 (SVN)
- Fixed in revision: 17810 (#ce47c40c)