Server side paging?

  • Thread starter Thread starter Author #1
  • Start date Start date
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.
 
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...
 
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 particularI
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.
 
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...
 
Back
Top