DataGrid RowDetails should not scroll

Feb 25, 2010 at 4:30 PM

I have a DataGrid in my app with a lot of columns so a horizontal scrollbar is shown.

In the RowDetails I show a UserControl with some controls in there. I use a Template for it.

The UserControl width should be exactly the visible width inside the ScrollViewer.

1. I'm looking for an elegant way to keep this width always as expected. My first approach is to get the DataGridRowsPresenter width and the DataGridRowHeader width to calculate it in ArrangeMeasure of my UserControl. What I also need is the best solution for adjusting the width on resizes.

2. My other wish is that the RowDetails should not scroll together with the rows when I scroll the horizontal bar.

Does anybody have a hint for me how to solve my problems? Is there an alternative I have overseen?