Click here to Skip to main content
15,889,931 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
Hello sir

i have gridview with 25000 records i use sessions for searching sorting paging everything and also remembering last action but my page is getting infinite loop all is working fine but i dont have any idea or sequence where i am sticking so please give me some links or any code from that i can make my gridview faster handling larger dataset.....

thanks in advance..

scenario
[updated]
gridview

>by default 25000 records will be shown with page size 25 and then paging......

>there is 10 fields image,productname,saleprice,active edit and delete button on click of edit user will redirected to another page
>
now paging will be like this if user on 1st page change sale price then goes to 2 page again to 1 page updated price should be remains updated

>
while page is refresh page searched record sorted record updated record paged record should be stay same as was before....
Posted
Updated 27-Aug-13 18:37pm
v6
Comments
Thanks7872 26-Aug-13 2:20am    
gridview with 25000 records? Oh...!!

make my gridview faster ?
Dholakiya Ankit 26-Aug-13 2:22am    
yes i want some technique for making it faster
Thanks7872 26-Aug-13 2:23am    
Do you consider GridView with 25000 records as a good practice?
Dholakiya Ankit 26-Aug-13 2:24am    
no but i dont have any other choice do you have?
Thanks7872 26-Aug-13 2:26am    
Why not other choice? You explained that you are going to provide search functionality. That is you are filtering data some way,then why not to filter it while binding it with gridview? If i give you 25000 records,would you like to go through that much records? No body will.

Check out these links
I know this not the solution for your scenario but why not you change the way you are doing ,try this way.
scroll_y_infinite.html[^]

server_side.html[^]
 
Share this answer
 
Comments
Dholakiya Ankit 26-Aug-13 6:45am    
gud 1
 
Share this answer
 
Comments
Thanks7872 26-Aug-13 2:47am    
I am not voting for this,but do you think custom paging is relevant with what OP is asking for? He is aimed to make gridview faster but have 25000 records,then there won't be any performance improvement if he applies this.
Thanks a lot Rohan Leuva... :)

Yes, it will improve the performance. That is because the specified number of records per page will be retrieved from the database. It will not retrieve all the records at once. Suppose he wants show 10 per each page, so, 10 number of records will fetched at once and not all the 25000 records. When he will click on 2nd page, then only next 10 records will be fetched.
Thanks7872 26-Aug-13 3:06am    
That is 2500 page numbers at the bottom of the gridview,if i am not wrong?
Yes, but that will not create a problem, as all the records are not getting fetched at once.
Thanks7872 26-Aug-13 3:22am    
My purpose was to provide him with the solution which should be improved as well as logical in order to reduce the data being fetched at the first place. If we consider that this solution will improve the performance,but on the other side no body will go through 2500 pages at once. User will be going to filter data some how. Then why not to present it filtered?
You can try paging in your select Query result from Data Base & not in your aspx page.
Put a combo in your search page which will contain 50,100,150,200 so on & combo value should be 50 default.
now, use paging concept in Data Base.

Check for this link as well
SQL Server 2005 Paging Results[^]
 
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