14

In our current WinForms app, we are displaying millions of records in ListView, using virtualization. Rows are loaded from DB as they are requested. This works well, with good performance.

This is a showstopper for migrating to WPF for us. We need data virtualization in a ListView, like WinForms 2.0 has.

Do you know a decent third-party control, or a relatively easy way of doing it with built-in controls? It doesn't need to be a DataGrid, a simple ListView will suffice.

Note, I'm note talking about UI virtualization, it's data virtualization.

Robert Jeppesen
  • 7,837
  • 3
  • 35
  • 50
  • 1
    From UX perspective: Do the users benefit from being able to scroll through millions of rows? Aren't they always interested only in the first few (hundred) items, based on search? – Martin Konicek Jun 18 '12 at 00:15

4 Answers4

14

The article WPF Data Virtualization should be exactly what you are looking for, I just implemented it quite easily, and it works.

Martin Konicek
  • 39,126
  • 20
  • 90
  • 98
2

Xceed DataGrid for WPF has data virtualization support.

Samuel Jack
  • 32,712
  • 16
  • 118
  • 155
1

This is the description for the Ultimate ListBox for WPF from Xceed:

Intelligent virtualized background data retrieval:

Automatic data retrieval only gets records from the remote data source if they are visible (data virtualization). This greatly reduces the amount of data to be transferred, which increases the perceived speed of the listbox. Also reduces strain on the server.

slugster
  • 49,403
  • 14
  • 95
  • 145
Dahdahm
  • 513
  • 3
  • 16
-1

Just add following properties in your listview declaration in XAML.

<ListView 
      VirtualizingPanel.IsVirtualizing="True"
      VirtualizingPanel.IsVirtualizingWhenGrouping="True"
      VirtualizingPanel.VirtualizationMode="Recycling"
      ScrollViewer.IsDeferredScrollingEnabled="True" >
</ListView>