>> Is there any way to make Listview items invisible or otherwise keep
>> them from displaying? Seems like temporarily removing, then restoring
[quoted text clipped - 3 lines]
>
>Have you tried it? Is it in fact a severe runtime hit?
The ListView lists info on files, so there could be thousands of items
at times. The goal is to set up 'filters' so that subsets can be
displayed.
Re runtime: I've tried some worst-case scenarios, and just adding the
items takes a while.
Also tried using swapping in a different ListView control using some
of the items pulled from the original ListView. Seems that you can't
use a ListViewItem more than once (damn) so I had to do bitwise
clones. Also time-consuming.
>For what it's worth, I suspect that removing/adding items is much _more_
>performant than hiding. When you remove something, it is simply not in
>the ListView. If you hide it, then every time the ListView draws, it
>needs to know not to draw it, which is extra effort.
That's a good point. I thought that if the mechanism was there, that
maybe there would be some internal caching in place.
>Of course, all this is probably moot...I don't think that there is in
>fact a way to leave something in the ListView items collection and yet
>hide it.
Nothing like a dead end to guide coding strategy, eh? <g>
> But even if there were, I don't think performance would be a
>reason to take advantage of that.
>
>Pete
Unfortunately, it will perform poorly as it is too.
AlexS - 27 Aug 2007 12:03 GMT
How many items you add and how? Over 100K?
Could you post the code which is slow?
>>> Is there any way to make Listview items invisible or otherwise keep
>>> them from displaying? Seems like temporarily removing, then restoring
[quoted text clipped - 36 lines]
>
> Unfortunately, it will perform poorly as it is too.