Forum > LCL
Critique this code that implements filtering on a TStringGrid.
dbannon:
I use a TListView that may have more that 20,000 items. It runs in virtual mode with the actual data in a FPList. For searching, I maintain two other FPLists, both just indexes (and I cast the fplist pointer to an long int and that is the index into the data list). Of these two index lists, one is alphabetical, the other date sorted.
If the user is searching interactively, I remove the items from the active list that do not match the seach. So, much faster as the search progresses. Down side is need to regenerate those index lists.
Overall, works well and is relatively simple.
jamie:
20k items are nothing for a in memory accounting system, but Millions was stated!
Navigation
[0] Message Index
[*] Previous page