Solved

Hiding an item in a Listbox

Posted on 2007-03-29
1
245 Views
Last Modified: 2010-04-16
Dear Experts,

I have two listboxes ListBox1 and ListBox2. How can I hide or make items visible=false for the items in ListBox1 that are in ListBox2.

Please help
0
Comment
Question by:rowmark
1 Comment
 
LVL 12

Accepted Solution

by:
craskin earned 500 total points
ID: 18817702
For li as ListItem in ListBox1.Items
   For ili as ListItem in ListBox2.Items
        If li.Value = ili.Value Then
             li.Visible = False
        End If
   Next
Next

You could try something like that. but i'm not 100% on my syntax.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
using sqldatareader to populate cells in Excel-syntax 6 21
SSRS Deployment problem 5 91
Amazon S3 .Net error 5 37
asp.net mvc 2 32
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

713 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question