|
-
Nov 17th, 2003, 01:24 PM
#1
Thread Starter
New Member
Help!!!
Ok this is what I got....
Two Combo boxes with drop down lists
First box has company name
seconds has list of items sold by the company
PROBLUM
I want to seclect a company from the first box THEN...
The drop down list in the second box will Change to have only the companys list that was selected in the first box
Help I don't have a clue where to start with this
Thanks
-
Nov 17th, 2003, 01:33 PM
#2
Addicted Member
you can change the source of the second combobox is the first comboboxes SelectedIndexChanged handler
for exp ...
Code:
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
Select Case ComboBox1.SelectedText
Case "Company1"
' fill the second combo box by the items sold by company 1
Case "Company2"
' fill the second combo box by the items sold by company 1
End Select
End Sub
-
Nov 17th, 2003, 01:36 PM
#3
Addicted Member
where is the data coming from? array?dataset? i think its better to use other controls and not the combobox ( of course if you dont have your special reasons to do so )
-
Nov 18th, 2003, 02:42 PM
#4
Frenzied Member
persionboy,
I'm curious as to why you say it's best to use other control than the combobox. Which control(s)? Why is it better?
Thanks,
Mike
-
Nov 18th, 2003, 02:55 PM
#5
Addicted Member
yeah i got your case confused with one that i was doing in which the treeview worked for me fine in a simular case. sorry for getting you confused
-
Nov 19th, 2003, 03:24 AM
#6
Fanatic Member
Hi..
You can set the sqlconnection , sqladapter to fill the dataset based on your filtering criteria, to load you can use set your combobox's datasource to the dataset ..
good luck
Regards
Winanjaya
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|