Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / VB.NET / December 2005

Tip: Looking for answers? Try searching our database.

Linked Listboxs

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Rod Gill - 14 Dec 2005 09:02 GMT
Hi,

I want to have two Listboxes side by side in a windows form.

Listbox1 will have a list of Programs
I want Listbox2 to show a list of all projects belonging to the selected
program and for listbox2 to update when each program is selected in
Listbox1.

Visual Basic Professional 2005

I've tried help, but help seems worse than ever. I've tried 7 or 8 different
searches and I get 500+ results on anything but listboxes and what's in the
first page of results is for VB 2003 or earlier!@#@!

Help much appreciated
Signature


Rod Gill

Rod Gill - 14 Dec 2005 18:47 GMT
I have bound the list boxes to the data in SQL Server, I just need to link
the two boxes so the second only shows data related to the first.

Signature

Rod Gill
Project MVP
Visit www.msproject-systems.com for Project Companion Tools and more

> Hi,
>
[quoted text clipped - 12 lines]
>
> Help much appreciated
Rod Gill - 14 Dec 2005 21:14 GMT
Edit the binding source properties to add a Filter. Programmatically modify
the filter whenever the first listbox selected value changes. Seems to work
a treat.

>I have bound the list boxes to the data in SQL Server, I just need to link
>the two boxes so the second only shows data related to the first.
[quoted text clipped - 15 lines]
>>
>> Help much appreciated
Randy Cragin - 15 Dec 2005 00:24 GMT
How are you going to retrieve the information? Database, folder/file reader?
Are you hard coding the program list? Xml?

At some point your going to have to write some code and build a framework
for your data and then decide how to store and retrieve it.

Here's a tip to get you started. You could index your programs list in the
data column and then use this to retrieve the set of projects to fill in your
second list box.  Such as "Funny Code", "FC" or just "1" then however your
saving your project data have the index as part of it so that it identifies
itself with your program.

Randy


> Hi,
>
[quoted text clipped - 12 lines]
>
> Help much appreciated
Rod Gill - 15 Dec 2005 02:20 GMT
Hi,

I've bound the controls to respective related tables and they display data
as expected. I just need to limit what's in the second listbox to the
selected, related master record in the first ListBox.

I've done it now by using a Filter on the binding source object

Thanks.

Signature

Rod Gill

> How are you going to retrieve the information? Database, folder/file
> reader?
[quoted text clipped - 31 lines]
>>
>> Help much appreciated

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.