-
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
:confused:
-
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
-
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 )
-
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
-
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
-
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