0

WPF Listbox or Datagrid exhibit very bad performance when data are grouped due to missing virtualization:

WPF DataGrid Virtualization with Grouping

Performance improvement is promised in .NET framework 4.5. (Improved performance when displaying large sets of grouped data). Is it true? Does somebody tried it?

Community
  • 1
  • 1
IvanH
  • 5,039
  • 14
  • 60
  • 81

1 Answers1

0

Out of the box there is no performance improvement. It is necessary to set the attached property VirtualizingPanel.IsVirtualizingWhenGrouping (new in framework 4.5), which allows to switch on virtualization when grouping.

<DataGrid EnableColumnVirtualization="True" EnableRowVirtualization="True"
   VirtualizingPanel.IsVirtualizingWhenGrouping="True">

The perfomance gain is enormouse. Expanding of about a thousand member group went from about 40 seconds to a fraction of a sececond.

IvanH
  • 5,039
  • 14
  • 60
  • 81