Click here to Skip to main content
15,886,873 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I am having a table with 1 million record how to bind all the records to webgrid in my MVC4 Application, I am using Entity Framework with wcf service for my mvc application ??
Posted

1 solution

You don't want to display all record at once. It would take forever and the browser might run out of memory... You'll have to use paging and display say 2000 pages of 500 records.

It does not make much sense to display more than a few thousand records at once in client/server architecture as there is too much data transfert.

Well, there might be a solution... use a grid control that supports virtualization and only load records around displayed data. For that, you will typically need client-side control like some kind of jQuery grid...

If you want to allows sorting, then you would also need indexes at the database level for such large data so that you can get only the required data in a reasonable amount of time.

Very large grid a generally considered as a bad design. At one million record it is very hard to navigate at a specific location as scrollabar are imprecise (it can move thousand of record for each pixel of movement) or very slow if you move one page at a time (assuming 50 visible records, it take 20 key press per thousand records)
 
Share this answer
 
v2
Comments
Sergey Alexandrovich Kryukov 12-Mar-14 0:33am    
Sure, a 5.
As to the number of records to see, my idea is: no more then 3-4 screens heights at once. Could be more only if it's possible to show all the data at once...
—SA
Maciej Los 12-Mar-14 18:07pm    
5!

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