update TadvStringGrid content with activated filter

main.pas (2.1 KB)
I update a TAdvStringGrid with the content of a textfile.
For this I clear all lines and add them again with the new content.
But if the filter is active, it causes some strange behaviour.

My Demo:
Try to hit the Button several times with activated Filter.
After the update there are too many lines.
Im sure I can do a workaround if I deactivate the Filter during the update process but perhaps there is a better way…
So, is there a better method updating the content with activated filter?

Try to set grid.FilterType = ftSuppress