Binding many-to-many tables in two DataGridView
There are three classic tables from the database Northwind:
Products, OrderDetails, Orders
There are two DataGridView: DgProducts and DgOrders.
as deduced from the data in table Orders(DgOrders), which are connected with the data in table Products (DgProducts), using the relationship many-开发者_运维百科to-many.
txn!!!
Have you tried doing an SQL Statement
where you can get all the datas you want to display on the two DataGridView
?..If so, then store the result of it in a DataAdapter
and then to a DataSet
. Where you can use the DataSet
as a DataSource
for your DataGridView
.
精彩评论