1

I have some grid scenario with > 500,000,000 rows I would like to display in ListView.

If I artificially limit my ListView to display 100,000,000:

 _listView.VirtualListSize = _data.Count;
 if (_listView.VirtualListSize > 100000000)
   _listView.VirtualListSize = 100000000;

Everything works fine (In VirtualMode naturally). When I change my code to:

 _listView.VirtualListSize = _data.Count;
 if (_listView.VirtualListSize > 100000001)
   _listView.VirtualListSize = 100000001;

The ListView display an empty grid... Is this a Microsoft Bug? Where is this coming from? Is this a Win32 ListView limitation? Most importantly, why is this not documented?

Adrian Zanescu
  • 7,907
  • 6
  • 35
  • 53
damageboy
  • 2,097
  • 19
  • 34
  • If you're displaying 50M records to the user, the last question you should ask is "how can I display 100M?". GUI needs a re-design, stat! – Juliet Mar 16 '10 at 14:12
  • 1
    This is in VirtualMode. The user has tons of methods to navigate the data, that are not as silly as scrolling one by one. Why should VirtualMode be limited to anything less than 64 bit? Moreover, why is this not commented? And who decides that 100,000,000 is OK, but 100,000,001 is not? – damageboy Mar 16 '10 at 14:37
  • 2
    @Juliet Look at [Picasa](http://picasa.google.com/). It can display a few million items (i only have a few million images), and it's perfectly navigable for the user. The knee-jerk reaction *more than **x** items is too much* is just not valid. – Ian Boyd Jun 11 '12 at 16:53

1 Answers1

5

It can't be done. As you have found, 100,000,000 is the absolute limit. MS never documented it (AFAIK), but the limit has been known for a long time: an answer from 2004.

On previous versions of Windows, trying more than 100,000,000 crashed the OS :)

On my XP and Vista machines, trying more than 100,000,000 rows limits the size to 9,999,999.

Grammarian
  • 6,774
  • 1
  • 18
  • 32