title: Show parent / child rows in same datagrid
body: <p>looking for some guidance on how best to approach this problem.</p>
  
  <p>I've got a requirement to create a data grid that shows some parent rows and on each parent row we have a expand / collapse button. When clicked this button will cause some related child rows to be displayed under the parent row. </p>
  
  <p>I've implemented this by using a rowdetailstemplate on the parent data grid that when expanded shows another datagrid that then displays the related child rows. This earlier question <a href="https://stackoverflow.com/questions/9773162/displaying-hierarchal-parent-child-data-in-wpf-datagrid">Displaying hierarchal parent child data in WPF DataGrid</a> shows the details..</p>
  
  <p>This works ok but has the problem that each parent row effectively has a seperate datagrid for the children, so things like navigating with the keyboard don't work too well, as the child rowdetails area is skipped over, the only thing we navigate is the parent.</p>
  
  <p>Other problems are when we select child rows with the mouse we end up with several rows that are highlighted as selected. This is understandable as each grid is a seperate control.</p>
  
  <p>The aim is to treat the child rows the same as the parent rows, in terms of selecting , navigating etc.</p>
  
  <p>Does anybody have any pointers or guidance as to how to solve this problem? </p>
  
  <p>Thanks</p>