Is WinForms ListView in VirtualMode limited to 100,000,000 rows?

我与影子孤独终老i 提交于 2019-12-19 11:33:08

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/2454942/is-winforms-listview-in-virtualmode-limited-to-100-000-000-rows

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!