Smoother vertical scrolling when using RowDetails

Apr 7, 2009 at 5:21 PM
I'm using RowDetails in a DataGrid and I've got some troubles with vertical scrolling. By default when all my RowDetails are collapsed the DataGrid scrolls vertically by one row at a time. This is fine but when I expand the RowDetail on the top row, subsequent scrolling will skip whole RowDetail section right to the next row. Is there a way to make scrolling smoother so I can scroll through the RowDetail section, when expanded, rather then just skip to the next row?
Coordinator
Apr 7, 2009 at 9:32 PM
With virtualization on (which is the default), DataGrid scrolls by row - the RowDetails are part of the row, which is why you're seeing this behavior.  ItemsControls do have smooth scrolling, but it is disabled by virtualization, so unfortunately the only way you can achieve this is by turning off virtualization and setting CanContentScroll to false on the ScrollViewer inside DataGrid.  This could obviously have a big impact on performance and may not work for your scenario. 
Apr 8, 2009 at 10:58 AM
Thanks a lot for your help, your solution works very well and so far I haven't noticed any performance issues.