Click here to Skip to main content
15,860,859 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
I couldn't display 3 millions of records in aspxGridview

What I have tried:

I am using aspxGridView. So user can do grouping and filtering at runtime. When I try to fetch the records obviously it shows an exception `System.OutOfMemoryException`.

If it is possible to show please tell me the way. If not, is it possible in windows application?
Posted
Updated 9-Dec-16 8:54am
v2

This is a REALLY bad idea.

1) It's doubtful you'll ever have enough memory to load that much data.
2) There's no way your user us going to scroll through million records.
3) it would take FAR too long to load.

You should implement some kind of paging and filtering.
 
Share this answer
 
Even if you would manage to show all the records, who would need or go through all the data? You're not probably expecting the user to use all the data.

In my honest opinion you should step back and rethink the problem. What information is required and how to show it. Paging is one thing but still if you would have 25 rows per page you'd still have 120'000 pages...

If the idea is that user filters the relevant part of the data, then gather the conditions and use them in your query. For example if user wants to see only records from past day, fetch only them and place the result in the grid. This should make the program manageable, more reliable, and faster.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900