Hi guys please help am trying to bind my combo boxes to the datagridview.What i want to do is to select data from the combo boxes and that data to be transferred immediately to the datagridview and that data in datagridview as well to be saved to the database.please help.

Recommended Answers

All 5 Replies

Hi guys please help am trying to bind my combo boxes to the datagridview.What i want to do is to select data from the combo boxes and that data to be transferred immediately to the datagridview and that data in datagridview as well to be saved to the database.please help.

you mean , you want to show data based on selection of combo box ? what the values combo box contains like state, country etc.. ?

you mean , you want to show data based on selection of combo box ? what the values combo box contains like state, country etc.. ?

yes thats what i mean,plz help tx.

yes thats what i mean,plz help tx.

Okay..you need to handle SelectedIndexChanged event of Combo box. So each time you change the value of combo box, the event will get fired. In this event you need to write the code to bind your gridview.

Okay..you need to handle SelectedIndexChanged event of Combo box. So each time you change the value of combo box, the event will get fired. In this event you need to write the code to bind your gridview.

thanks it works,the other that i would lyk to ask is how do i make this selected data to be inserted into a specific column in the datagridview.
tx.

thanks it works,the other that i would lyk to ask is how do i make this selected data to be inserted into a specific column in the datagridview.
tx.

cool..:-). now regarding your another query, can you please explain in detail and put some line of code here ? currently how many columns are there in your grid view?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.