Home › Forums › WPF controls › Xceed DataGrid for WPF › How to realize master/detail scenario?
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)
I just got this to work .. Thank you
Imported from legacy forums. Posted by Benno (had 2678 views)