Syncing DataGrid BindingContext

J

Joe Reggae

Hello,

I'm a little weak in understanding concepts surrounding currency and binding
context and appreciate advice in getting some grids to bind (in sync) to
three related tables.

Specifically, I have three tables with one-to-many relations defined in my
dataSet from parent to child and from child to grandchild. To that are bound
three datagrids ...

ParentGrid1.DataSource = ds.Parent;
// ParentGrid1.DataMember = none;

ChildGrid2.DataSource = ds.Parent;
ChildGrid2.DataMember = parent_to_child_relation;

GrandchildGrid3.DataSource = ds.Child;
GrandchildGrid3.DataMember = child_to_grandchild_relation;

Grids 1 and 2 are in sync. Grid3 is not in sync with the others and just
shows one row. Is it clear to anyone (maybe even to everyone?) what I'm
doing wrong?

Thanks for advice.


ps - Sorry for cross-posting this message to the asp.net group ... an errant
click.
 
J

Joe Reggae

I fixed this BindingContext problem by setting the DataSource of all three
grids to the dataSet (instead of to tables in the DataSet).
 

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