(SOLVED) DBGrid dlookup question lazarus / 16-Databases ---------------------------------------------------------------------- xinyiman · 2017-09-15 19:23 Hi guys, I created a lookup field in a dbgrid. It works fine, but if I have so many records in the lookup list I need to be able to filter it by pressing the keys. Does anyone tell me how to do it? The example contains a few lines, hypothesized instead of showing a list of 1000 articles in the lookup, so you can select the desired value by scrolling it with the mouse. Anyone know how to help me? Thank you ---------------------------------------------------------------------- xinyiman · 2017-09-16 13:15 No suggestion? ---------------------------------------------------------------------- taazz · 2017-09-16 13:29 I usually do not filter my lookup fields, I make sure that they are sorted by the description field and I'm using the locate function to auto-select the first closest value in the dataset. I haven't looked at the posted code yet but in order for a filter to work you need to make sure that it is cleared when the master dataset is scrolled to a new record and the record packets are set to 0 forcing a "retrieve all" when open, otherwise the results will be sketchy at best. ---------------------------------------------------------------------- xinyiman · 2017-09-16 15:04 @taazz: can you change my example using the locate? Because I can not get it to work. Thanks, it's very important to me ---------------------------------------------------------------------- taazz · 2017-09-16 15:07 I'll se what I ca ndo later tonight at home. ---------------------------------------------------------------------- xinyiman · 2017-09-16 15:19 Thanks so much ---------------------------------------------------------------------- xinyiman · 2017-09-17 08:50 @taazz: news? ---------------------------------------------------------------------- taazz · 2017-09-17 09:02 I didn't had much time yesterday, I only installed zeos data objects added more names and jobs to help in testing and the rest today. I will start by adding an external dblookupcombo and making it work there, after that I'll embed the same logic in the dbgrid editor. Sorry, it will take a bit longer than I planed. ---------------------------------------------------------------------- xinyiman · 2017-09-17 09:29 She does nothing, look. Appearance Thanks so much ---------------------------------------------------------------------- taazz · 2017-09-17 17:41 Find attached the first results. Is this sufficient or should I try to implement filtering as well? ---------------------------------------------------------------------- xinyiman · 2017-09-18 08:52 Thank you taazz! Is perfect