?
Solved

How can I speed up the rendering of a gridview with no pagination?

Posted on 2008-06-25
1
Medium Priority
?
1,734 Views
Last Modified: 2013-11-07
I have a gridview on a page (5 columns returned from a SQL Server 2005 database & 1 checkbox column)  I don't have pagination specified on the page because the user needs the ability to select 0 to many rows.  I also have a textbox with a button with javascript behind the scenes so the user can specify the number of rows to select.  The problem occurs when there is more than roughly 500 rows returned to the page, anything less than that and everything loads fine.  But when there are more rows returned (could be up into the 5000's) the page takes long to load (more than 45 seconds).  I'm not doing any custom formatting or anything to the data displaying on the grid and the only control I have is a checkbox, which doesn't have any custom code attached to it.  When I run the query in Management Studio it returns in seconds no matter how large the dataset is.  Is there any way to speed up the rendering of this gridview?  I tried using an updatepanel but it doesn't seem to help matters.

Thanks in Advance.
0
Comment
Question by:chuck620
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 37

Accepted Solution

by:
samtran0331 earned 2000 total points
ID: 21864600
>>But when there are more rows returned (could be up into the 5000's)

I don't see why a user would want to see that many rows of data.
But if this grid does not do any editting, you can disable viewstate for the gridview or the page...that would speed it up some, but 5000 rows of data (even without viewstate) is a lot of html that needs to get rendered.

Also try adding to the page directive:
<%@ Page Buffer="false"

This keeps the page from waiting for all the html to be "ready" before it renders...
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question