3 Datagridviews bound

G

Guest

Hi,
I have three datagridview controls bound to three tables in a dataset. Two
relations exist to join the three tables. Ie Master to Child1 and then Child
1 to Child 2.
The Master and Child 1 DataGridView (DGV) work fine with the rows changing
in Child1 to relect the Master. But...
The 3rd DGV (Child 2) lists data for the first row of Child 1 and does not
change when Child 2 data changes. Ok I know I am doing something wrong, but
what? Any help would be appreciated.

ps I am making sure that all have the same binding context by explicitly
setting even though it gets it from the container.
 
N

Nicholas Paldino [.NET/C# MVP]

Ade,

When you are binding to child tables, and only want to see the related
records for the selected record in the parent table, you need to bind to the
DataRelation, and not the child DataTable.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top