Hide rows in listview?

  • Thread starter Thread starter Chris
  • Start date Start date
C

Chris

Is it possible to hide specific rows in a listview?
I currently have a listview in details view and the user can select
multiple views which shows the listview items matching the selected
criteria. I currently populate the listview from a List<> each time the view
is changed, but was curious if it would be possible to just hide rows which
do not match the criteria.
Any help would be appreciated.

Chris
 
Is it possible to hide specific rows in a listview?

Unfortunately I think the only thing you can do is remove it. Of course,
you could keep it in a separte List<> so you can put it back - you don't
have to destroy the ListViewItem.

-mdb
 
Michael Bray said:
Unfortunately I think the only thing you can do is remove it. Of course,
you could keep it in a separte List<> so you can put it back - you don't
have to destroy the ListViewItem.

-mdb

That's what I've been doing, but I have a lot of possible search parameters
and removing/repopulating the listview from a List<> for all these has led
to a rather large listviewPopulate() method. I was just curious if there was
any way to reduce it/make it more efficient :).

Chris
 
That's what I've been doing, but I have a lot of possible search
parameters and removing/repopulating the listview from a List<> for
all these has led to a rather large listviewPopulate() method. I was
just curious if there was any way to reduce it/make it more efficient
:).

Well there is one thing you could try... ListView in .NET 2.0 supports an
OwnerDraw. I'm not sure how much trouble that would be. Maybe you could
somehow call the default drawing mechanisms?

-mdb
 
Back
Top