473,386 Members | 1,842 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 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 15326
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Tim Bücker | last post by:
Hello. Is it really not possible to hide the scrollbars of a listview ( this.listview.Scrollable = false; ) but do some scrolling anyway ( for instance: PostMessage(this.listview.Handle,...
3
by: Li Pang | last post by:
Hi, I'd like to know how to hide a column of the listview control. anybody gives a hand? Thanks in advance
7
by: txplayboy2002 | last post by:
Is there a way in vb.net to determine the number of rows that can be visible in the listview region ? Not the total # rows in the listview, but only the visible count. Also, I was wondering if...
3
by: Li Pang | last post by:
Hi, I want to know how to hide a column of listview. Thanks in advance
11
by: jimstruckster | last post by:
I have a table with 10 rows, I want all rows except for the first to be hidden when the page first opens up. If the user puts a value in a text box in the first row then I want the second row to...
0
by: news.microsoft.com | last post by:
Hello, I have attached a contextmenustrip in the designer to a listview. When running, if there is no item in my listview, the contextmenu still shows. How can I hide it when no item is...
1
by: MrNobody | last post by:
what's the trick in showing/hiding columns in ListView's Details view mode? I can change a columns width to 0 and it effectively makes it disappear but then you can actually resize the column to...
4
by: Miesha.James | last post by:
Hello. Is there a way you can insert a new row between current rows in a .NET listview? I tried and it was no success. The reason I want to do this is because when the application starts up it...
2
by: Brad Pears | last post by:
I am working on a new vb.net 2005 project using SQL server 2000 as the backend db. I have a listview where control I want a user to be able to select either just one or multiple rows in the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.