Solved

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

Posted on 2008-06-25
1
1,722 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 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

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

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

734 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