Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 Reporting Services Development
 Paging/Sorting a dataset having 20000 records

Author  Topic 

iamsunil
Starting Member

2 Posts

Posted - 2005-04-01 : 16:41:56
Hi,
I have a dataset with thousands of records. I'm displaying the data using a datagrid with paging and sorting. It takes a lot of time for the grid to page and sort the data.

Is there anyway to make it faster?

Any help is appreciated!

Thanks


jhermiz

3564 Posts

Posted - 2005-04-02 : 22:20:08
quote:
Originally posted by iamsunil

Hi,
I have a dataset with thousands of records. I'm displaying the data using a datagrid with paging and sorting. It takes a lot of time for the grid to page and sort the data.

Is there anyway to make it faster?

Any help is appreciated!

Thanks






You will need to write your own custom paging routine to make it go any quicker. If you are using the default method of paging asp.net actually pulls all records but only shows the TOP m of n records.

What this means is that it is kind of a hack of a way to page your data. The data instead of being what you want for that moment in time is actually all the data but only shows what you want. The default implementation is not the greatest paging mechanism only because all records are returned based on your binding of the data.

There are a few articles including on this site on how to select a certain number of records for paging. It becomes a bit more difficult than the default implementation that the datagrid uses but sometimes its is worth it.


Keeping the web experience alive -- [url]http://www.web-impulse.com[/url]
Imperfection living for perfection --
[url]http://jhermiz.blogspot.com/[/url]
Go to Top of Page
   

- Advertisement -