Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Gridview and paging
Message
De
11/12/2013 12:11:32
 
 
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
VB 9.0
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01589824
Message ID:
01589900
Vues:
30
>As I am looking at a couple of examples of implementing paging in a gridview (below is one url of an article) it seems to me that the way it is done is that on Every Next Page click the entire dataset (to which gridview is bound) is created. That is, every time user clicks to go to the next page, there is a call to DB and dataset is Fillled. Aside from visual (maybe) perception of dealing with smaller number of records, where is the processing saving of this method?
>
>Here is the article on which I base my understanding:
>http://www.dotnetgallery.com/kb/resource12-How-to-implement-paging-and-sorting-in-aspnet-Gridview-control.aspx.aspx
>
>I thought that the paging would get the entire dataset One Time and then simply display the rows of the dataset according to the user paging.
>
>What am I not getting?

The results of the query need to be cached if you want to use them again without reissuing the query. If you use a SqlDataSource (http://msdn.microsoft.com/en-us/library/dz12d98w%28v=vs.90%29.aspx), it can cache the results automatically. Otherwise, if performance is an issue, you may need to implement your own caching or paging functionality. If you are using SQL Server 2012, it now has OFFSET and FETCH clauses that you can use for paging (http://dbadiaries.com/new-t-sql-features-in-sql-server-2012-offset-and-fetch).
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform