Home Forums WPF controls Xceed DataGrid for WPF How to realize master/detail scenario?

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #23907 |

    Hi there,

    I already read another thread about a master/detail scenario with two grids, but i simply cant get my example to work.

    I have to data-tables, a master and a detail table, and two datagrids in my application

    I read something about setting the detail-grids itemssource to the CurrentItem of the master-grid with a relation, but i cant figure out how, so a bit of code could be helpfull.

    What ive got so far:

    gridMaster.ItemsSource = DataSet.mastertable;
    DataRelation rel = new DataRelation(“rel”,DataSet.mastertable.CustomerID, DataSet.detailtable.CustomerID);
    DataSet.Relations.Add(rel);

    Binding myBinding = new Binding();
    b.Path = ???
    b.Source = ???
    gridDetail.SetBinding(DataGridcontrol.ItemsSourceProperty, myBinding);

    Thanks for any help,
    regards b.greber

    Imported from legacy forums. Posted by Benno (had 517 views)

    User (Old forums)
    Member
    Post count: 23064

    I just got this to work .. Thank you

    Imported from legacy forums. Posted by Benno (had 2678 views)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.