471,325 Members | 1,320 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,325 software developers and data experts.

Hide rows in listview?

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
Jan 16 '06 #1
3 14622
"Chris" <mi*********@gmail.com> wrote in news:hLOyf.15054$lL4.6913
@fe1.news.blueyonder.co.uk:
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
Jan 16 '06 #2

"Michael Bray" <mbray@makeDIntoDot_ctiusaDcom> wrote in message
news:Xn****************************@207.46.248.16. ..
"Chris" <mi*********@gmail.com> wrote in news:hLOyf.15054$lL4.6913
@fe1.news.blueyonder.co.uk:
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


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
Jan 16 '06 #3
"Chris" <mi*********@gmail.com> wrote in
news:dY******************@fe1.news.blueyonder.co.u k:
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
Jan 16 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Tim Bücker | last post: by
3 posts views Thread by Li Pang | last post: by
7 posts views Thread by txplayboy2002 | last post: by
3 posts views Thread by Li Pang | last post: by
11 posts views Thread by jimstruckster | last post: by
reply views Thread by news.microsoft.com | last post: by
1 post views Thread by MrNobody | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.