423,688 Members | 1,894 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 423,688 IT Pros & Developers. It's quick & easy.

I have a combobox and a listbox. combobox data is populated from database table.When

P: 1
I have a combobox and a listbox. combobox data is populated from database table.When the user select an item from the combobox, then the listbox will show a certain data from the same table. How do I do this? please help me.
Jan 14 '14 #1
Share this Question
Share on Google+
1 Reply


100+
P: 299
The same way you got data into the combobox. When the combobox selectedindex is changed, you query the database for the information within the combobox, then get the value of the column that you want to be populated into the listbox and write it to the listbox. Example:

select * from Table where Column = 'combobox'

then

listbox.items.add(your reader.GetValue(column number)
Jan 14 '14 #2

Post your reply

Sign in to post your reply or Sign up for a free account.