update textbox based on value selected in combobox?

Posted by Sudheep.grandhe under C# on 11/24/2011 | Points: 10 | Views : 1490 | Status : [Member] | Replies : 4
Hi,

when i am trying to update it will execute.But,it wont shows the data.please do the needful.if i click on the combobox and i choose any item in that for eg:i choose companyname .based on that company name it has to show the remaining textboxes corresponding to the data.that data i want to update.Here iam placing the code.

for eg:
i have a combobox with name(companyname)in db(compname).if i click on companyname it shows the remaining data.those are customeraddress,invoiceno,orderno etc..

Best,
Sudheep.



Responses

Posted by: Gsolvers on: 11/24/2011 [Member] Starter | Points: 25

Up
0
Down
If i understand it right.....Please use the below code in the click event of combo box

text1.text=combo1.selecttext

Best Regards,

VG
www.TeacherJi.com

Sudheep.grandhe, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Arefin on: 11/26/2011 [Member] Starter | Points: 25

Up
0
Down
Hi Sudheep.grandhe,

Just follow the steps: (Say, our combobox name is ComboBox1)
1. Collect the selected Item from comboBox1_SelectedIndexChanged() event through ComboBox1.SelectedTex and put the value in a variable.
2. Using this variable value , query from database to retrieve more related data.
3. After getting data, just show them in texboxes.

Let me inform, if you face any problem.

Thanks,
Arefin

Sudheep.grandhe, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sudheep.grandhe on: 11/27/2011 [Member] Starter | Points: 25

Up
0
Down
Hi,

Thanks for replying to me.can you please send the sample code that was very helpful to understand.please do the needful.




Best,
Sudheep.

Sudheep.grandhe, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: chaudharysunny1989-22042 on: 5/4/2013 [Member] Starter | Points: 25

Up
0
Down
hi sir i want to do like when select a value(emp_name) from autocomplete combobox then there corresponding value(emp_address) fill in text box auto matic sir pls help me

Sudheep.grandhe, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response