• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 328
  • Last Modified:

Controling a ListView - VB.NET

I have a report that can take anywhere from 5-30 minutes to run.  The results are displayed in a listview.  The results are inventory items that either "Pass" or "Fail" a "quantity on hand vs. sales per month" test  (basically, do we have enough widgets in stock based on past sales averages).

Since the results can contain up to 4000 items it would be nice to toggle three displays:
1. All Items that Pass
2. All Items that Fail
3. All Items Regardless

Right now it shows all items, I simply change a subitem in the listview to say Pass or Fail and change the color to red if its a fail.

Is it possible to hide or toggle the results to display like this?

Thanks for your help!!!
  • 2
  • 2
1 Solution
Bob LearnedCommented:
I don't understand what you mean by "hide or toggle".  Do you mean changing a sub item dynamically after the ListView item is created?
slightlyoffAuthor Commented:
Sorry for being confusing...

Imagine having a listview of 4000 items (or products).
Each item falls into 1 of 3 categories:  

1. Not Enough on Hand  
2. Enough on Hand
3. More than Enough on Hand (as in, we'll never sell them all...)

So I'm looking at the list of 4000 items and I decide I just want to see items in category #1.

Can I hide items in category 2 and 3 without clearing and refilling the listview?

I hope that clears it up a little bit.  Thanks for your response!!!
Bob LearnedCommented:
Hmmm...you can hide groups, but I don't believe that ListViewItem supports hiding.  

One possibility might be using a custom ListView that supports data binding, and binding the ListView to a filtered DataView.

A Much Easier to Use ListView
slightlyoffAuthor Commented:
Thanks for your help!  I've had to move on from the project, sorry it took me so long to respond
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now