Click here to Skip to main content
15,895,192 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,

I have used a Generic DataSet (to bind two DataGridViews) containing following two tables:

1. Teams
2. Team Members

I have combobox (Binded with Team) in DataGridview (Team Member) Cell. When I change the combobox selection My both DataGridView get reset.

However, I want to update database with the selection made.

But, How?

Regards!
Aman
Posted

1 solution

Hi
From what I understood your problem is that you use the same dataset with the same TableAdapter and BindingSource in both the DataGridViews , if this is right then here is your solution you just have to make a copy of your dataset and TableAdapter and also the BindingSource lets assume they will be dataset2 and tableadapter2 and bindingsource2 now assign them to each others and assign one of the DataGridViews to them and now when you change one of them the other wont change

I hope I helped
:-)
 
Share this answer
 
Comments
Aman4.net 31-Mar-11 5:42am    
Thanx for your support! But the point comes in mind How will we manipulate more tables together if we can not update only two table together. I think that Microsoft may provided any another way to do so. But your way worked well.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900