0

I have 3 drop downs in vb.net which are querying the database. I want the user to be able to choose the first drop down item, and based on his/her selection the third drop down does its respective query. How would I do that?

cmdString = "select distinct t.desc, t.id " & _
                           " from Table t" & _                           
                '" where t.id=" & Me.ddFilter1.SelectedValue & _

I have commented part of my command string; I am using the selected value from my first dropdown, however when I Run to Cursor the value stays the same. my third dropdowns which is suppose to change shows nothing, because data reader is empty (since it cannot get anything off of the query in cmdstring)

how come the selectedValue in my first dropdown (ddFilter1) does not change when user selects a different item from first dropdown?

4

2 に答える 2

0

you could switch the selected item of the first one. and then depending on which case it is fill the next dropdown with values?

于 2012-10-31T15:25:40.370 に答える
0
where t.id=" & Me.ddFilter1.SelectedItem.Value 

Has fixed the issue.

于 2012-11-05T17:20:04.093 に答える