Solved

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

Posted on 2008-06-25
1
1,678 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
1 Comment
 
LVL 37

Accepted Solution

by:
samtran0331 earned 500 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.

911 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now