Server side paging?

A

Author #1

I am surprised to see how rarely people talk about paging in this
group. At least when I simply search for "paging", I got only one
search result

I am not interested in the GridView built-in paging since it retrieves
all from the database and only displays the pageful. It adds a whole
lot more network overhead than is necessary, doesn't it?

I've read a little online and found that all of them resort to
objectdatasource property of the GridView control. I don't like this
objectdatasource idea. I want to bind the result in my C# code-behind
when user clicks on a page number.

Anyone has a better solution? Will the asp.net 3.5 DataPager control
help? Thank you.
 
P

Patrice

Hello,

And how do you read your data ? For a SP based solution try
http://www.davidhayden.com/blog/dave/archive/2005/12/30/2652.aspx. If you
are using LINQ see :
http://blog.bluecog.co.nz/archives/2007/03/23/simple-paging-with-linq-for-sql/.

"Data providers" controls are now doing this automatically (in particular I
was quite impressed recently by Silverlight with RIA Services).

Also keep in mind that as always this is a tradeoff i.e. paging involves
sorting and keeping the relevant rows which comes itself with its own cost.
So as always you may want to try to filter your data as much as possible
before paging (and if data are filtered, custom paging is less needed). A
first step would be liekly to think about how much pages you would like to
present to the user...
 
A

Author #1

Hello,

And how do you read your data ? For a SP based solution tryhttp://www.davidhayden.com/blog/dave/archive/2005/12/30/2652.aspx. If you
are using LINQ see :http://blog.bluecog.co.nz/archives/2007/03/23/simple-paging-with-linq....

"Data providers" controls are now doing this automatically (in particular I
was quite impressed recently by Silverlight with RIA Services).

Also keep in mind that as always this is a tradeoff  i.e. paging involves
sorting and keeping the relevant rows which comes itself with its own cost.
So as always you may want to try to filter your data as much as possible
before paging (and if data are filtered, custom paging is less needed). A
first step would be liekly to think about how much pages you would like to
present to the user...

Thank you for the pointers. I am actually more interested in how to
do the paging thingy in the front end as I have said.
 
P

Patrice

Thank you for the pointers. I am actually more interested in how to
do the paging thingy in the front end as I have said.

LINQ would applies as well. My first impression was that you wanted to do
that at the SQL Query level to avoid reading too miuch data. Now it seems
you want to do that at the gridview level ? Note sure what you want exactly.
To avoid confusion please tell explicitely what you wish to page (a list of
objects, a sql resultset ?). We need some details about the context...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,066
Latest member
VytoKetoReviews

Latest Threads

Top