Click here to Skip to main content
15,890,438 members
Please Sign up or sign in to vote.
1.18/5 (3 votes)
hi can any one suggest me how to bind 500000 of records to data grid view without reducing performance.kindly explain with example if possible.
Posted
Comments
Afzaal Ahmad Zeeshan 30-Oct-15 17:01pm    
Bad programming and UX at its best! :-)

 
Share this answer
 
Hello.

You must follow "Lazy Loading". It can be a useful solution if you want to scroll to much records without any serious problem in performance. In google you are able to search and find many solutions.

For example:

http://www.developer.com/net/asp/article.php/3738616/Lazy-Loading-the-ASPNET-AJAX-TabContainer-Control.htm[^]


http://www.eggheadcafe.com/community/asp-net/17/10395462/gridview-and-lazy-load-plugin.aspx[^]
 
Share this answer
 
v3
Comments
Sergey Alexandrovich Kryukov 22-Mar-12 14:30pm    
Very good point. My 5.
--SA
Shahin Khorshidnia 22-Mar-12 14:33pm    
Thank you very much SA :)
use <asp:repeater.. xmlns:asp="#unknown"> data-control & allow paging as your requirement!
 
Share this answer
 
v2
Comments
visnumca123 22-Mar-12 7:15am    
Hi uuttam-kumar,I have one question even we fetch the data and binding that in to repeater also it will take time how to avoid the databinding slowness!
[no name] 22-Mar-12 8:30am    
You don't. You have been told that 500000 records is way too many. You refuse to use the correct way to do this (pagination) so you are just going to have to deal with it being slow. Seriously, did you really expect that trying to stuff 500K records into anything would be lightning fast?
uttam2010 23-Mar-12 1:31am    
you are right Vishu & W.Aday,fetching of 500k records by repeater control without any acceleration(ajax,custom control,Tick event etc) not possible !
Hello:

You have to get records depending of the page number .

Example (50 rows per page):
When you are in the first page.. only get the first block rows (1-50 rows),
When you are in the second page. only get the second block (51-100 rows).

do that and your performance won't be affected


See you..
 
Share this answer
 
Comments
Matt T Heffron 30-Oct-15 16:55pm    
Why are you answering a question that was already answered more than 3 years ago?
CHill60 30-Oct-15 20:34pm    
It's a good point, however all you are describing is "lazy loading" that was already proposed as a solution over 3 years ago.
TIP! If you see questions in the QA forum, read them carefully, check the date they were posted, read the solutions already posted. If you can't add something new then avoid posting a solution
Krunal Rohit 31-Oct-15 0:00am    
I often wonder how do they get to answer this much old questions ?

-KR

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