How can I have a master detail scenario using Xceed datagrid for WPF – e.g. two datagrids on the same window, one displaying Suppliers and the other one displaying products. So when the user selects a supplier row, I would want the products data grid to show only the products supplied by the current selected supplier.
Imported from legacy forums. Posted by Shingi (had 2329 views)
If you are using a DataTable as a ItemsSource, it is pretty simple… All you need to do is to bind the second DataGridControl (the details grid) ItemsSource property to the first (master) DataGridControl’s “CurrentItem.<i>PutRelationNameHere</i>” PropertyPath.
If you are not using a DataTable, it is slightly more complicated, you still need to bind the second DataGridControl to the “CurrentItem”. But this time, instead of specifying the relation in the PropertyPath, you need to place a converter on the binding that would fetch the appropriate data from your other source and return it.
Imported from legacy forums. Posted by Marcus [Xceed] (had 242 views)