tags:

views:

598

answers:

4

what is the maximum number of rows can listview have?

A: 

If you use its virtual capability then I think you're limited by the maximum of int. But for practical purposes, virtual or not, you'll be hitting a memory limit before you hit a limit on the number of rows.

Adam Ruth
+6  A: 

The maximum number of rows a ListView can have will be constrained by available memory. However, the maximum number of rows you should place in a ListView should be constrained by common sense. A UI will simply be unusable with a ListView that comes anywhere near the actual limit imposed by the computer.

Mark Brittingham
A: 

The answers above are correct, constrained by available memory for the collection, but seeing as the count property of the items is an integer, I'd reckon you could have atleast 2,147,483,647 items :)

RandomNoob
+2  A: 

In a way, "limitless" for most peoples needs but remember;

"With great power, comes great responsibility".

Although you may be able to go crazy with the amount of rows it doesn't mean you should. Rethink your design to avoid having to ask these kinds of questions, think about the end user as they will be using the application.

Jamie Keeling