C# - Hiding ListViewItem based on a filter

Posted by fonix232 on Stack Overflow See other posts from Stack Overflow or by fonix232
Published on 2010-05-19T15:27:57Z Indexed on 2010/05/19 15:30 UTC
Read the original article Hit count: 277

Filed under:
|
|
|

I want to hide some items based on a text filter in a ListView.
Basically the listview loads the items from a text file, and I don't want it to be read and/or written when the user searches the list. The search is done in a combobox's KeyDown event, but there is no "Visible" property of the ListViewItem.

Is there any easy way to do this, WITHOUT re-reading the file? (as it is an XML file, and it could even contain thousands of items, it would be hard to search efficiently and even let the user use the application, as the search would take for minutes (mostly with the loading)).

© Stack Overflow or respective owner

Related posts about c#

Related posts about listview