Syncing DataGrid BindingContext

Discussion in 'ASP .Net' started by Joe Reggae, Mar 24, 2005.

  1. Joe Reggae

    Joe Reggae Guest

    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.
    Joe Reggae, Mar 24, 2005
    #1
    1. Advertising

  2. Joe Reggae

    Joe Reggae Guest

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

    "Joe Reggae" <> wrote in message
    news:...
    > 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.
    >
    Joe Reggae, Mar 24, 2005
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Thomas G. Marshall
    Replies:
    6
    Views:
    390
    Thomas G. Marshall
    Sep 26, 2005
  2. Ralph Krausse
    Replies:
    0
    Views:
    310
    Ralph Krausse
    May 11, 2004
  3. davem

    Syncing PPC time with desktop

    davem, Jul 5, 2007, in forum: ASP .Net
    Replies:
    1
    Views:
    539
    Michael Nemtsev
    Jul 5, 2007
  4. dads

    File Syncing

    dads, Jun 19, 2009, in forum: Python
    Replies:
    2
    Views:
    463
  5. ebeard
    Replies:
    0
    Views:
    272
    ebeard
    Oct 2, 2007
Loading...

Share This Page