Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2019-10

autocomplete a lookup field in Dbgrid?

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Luca Olivetti

I have a a dataset with a lookup field.
I edit it with a dbgrid.
The grid correctly uses a picklist for that field, but I couldn't find an easy way to autocomplete it (i.e. allow the user to type the first few characters of the value to select an entry).
The problem seems to be that the picklist field uses a TPickListCellEditor which derives from a TCustomComboBox that doesn't implement such functionality (it does but only to set the text in case it's a csDropDownList, it doesn't set the selected item). I see that a TDBLookupCombobox supposedly implements autocomplete (I saw some forum post when they say it's problematic, don't know if it has been solved now), but I cannot use it since I'm setting two fields, not one. Any idea?

TIA

Luca Olivetti Wetron Automation Technology http://www.wetron.es/ Tel. +34 93 5883004 (Ext.3010) Fax +34 93 5883007

Reply by email