Hello Everyone,
I am using access db. In database there is 1 table having company and addres as columns.
I have retrieved company in combo box.. What I want is on the selection of company in combo box it should display appropriate address in label..
I have retrieve data in combo box through wizard.
Can anyone please help me in write code..
Thanks in advance..
Loading

Nir Bar107 reputationPosted Sep 30, 2009, 5:26 AM EDT
It should be:
Please mark this post as an answer if it helps you
Nir
Nir Bar107 reputationPosted Sep 30, 2009, 4:53 AM EDT
You need to create an event-handler for selection in the combo-box
Code should be like (I didn't try to compile it)
//Add in the constructor of your form combobox1.SelectedIndexChanged += combobox1_SelectedIndexChanged; private void combobox1_SelectedIndexChanged( object sender, EventArgs e) {Please mark this post as an answer if it helps you
Nir
chetan bhattad19 reputationPosted Sep 30, 2009, 5:23 AM EDT
Thanks a ton for your valuable reply..
It works for me..
1 small problem when I am giving column name it is giving error.. Address not exist in current context..
but when I use row[1] it works...
Thanks again
chetan bhattad19 reputationPosted Sep 30, 2009, 5:41 AM EDT
chetan bhattad19 reputationPosted Sep 30, 2009, 5:53 AM EDT
Because When I use above code for decimal column, it is taking NULL value...
Nir Bar107 reputationPosted Sep 30, 2009, 6:12 AM EDT
Nir