WPF Data Grid - Expand and Collapse Master Rows
This example demonstrates how to expand and collapse the GridControl's master rows in code. The example contains the following buttons:
- The Expand All button expands all master rows.
- The Collapse All button collapses all master rows.
- The Collapse All But This button collapses all master rows except for the focused row / row with the focused detail.
The CTRL+*
shortcut is bound to toggle the focused master row's expanded state.
Files to Review
Documentation
- Data Grid in Details
- Expand and Collapse Master Rows
- GridControl.ExpandMasterRow
- GridControl.CollapseMasterRow
- GridControl.IsMasterRowExpanded
- GridControl.SetMasterRowExpanded