WPF Data Grid - Bind Master and Detail Focused Rows to View Model Properties
This example binds focused rows in master and detail grids to View Model properties. The focused row's name for each nested level is displayed below the GridControl:
You can bind CurrentItem, SelectedItem, and SelectedItems properties for master and detail grids to View Model properties.
Files to Review
- Window1.xaml (VB: Window1.xaml)
- ViewModel.cs (VB: ViewModel.vb)
Documentation
More Examples
- WPF Data Grid - Create Master-Detail Grid
- WPF Data Grid - Display Detail Content in Tabs
- WPF Data Grid - Expand and Collapse Master Rows
- WPF Data Grid - Display Different Details Based on Data in the Master Row
- WPF Data Grid - Use the ParentPath Property to Define the Selected Detail Row in the View Model