467,920 Members | 1,209 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,920 developers. It's quick & easy.

GridView sorting paging : perform in db ?

In regard to a GridView that must support searching, filtering, sorting, and
paging ...

There is a tradeoff in performing the sorting and paging in the database
versus to creating a CLR sort expression and allowing the GridView to
perform the sorting and paging.

How do people feel about each option for

(1) simple sorts (alphabetical, compound alphabetical)

(2) complex sorts (derived attributes, date-time manipulations, etc.)
Mar 27 '08 #1
  • viewed: 1690
Share:
1 Reply
It really depends on how many rows you have in the resultset that will be
paged.
If it is a manageable number. you can cache the results and simply rebind
the datasource based on the current page of results. If it is a very large
number of rows, this becomes inefficient because of the large number of
results and you'll be better off using custom paging via SQL RowNumber or
similar techniques. A simple google search on "Gridview Custom Paging" will
provide some good samples to study.
-- Peter
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short Urls & more: http://ittyurl.net
"John A Grandy" wrote:
In regard to a GridView that must support searching, filtering, sorting, and
paging ...

There is a tradeoff in performing the sorting and paging in the database
versus to creating a CLR sort expression and allowing the GridView to
perform the sorting and paging.

How do people feel about each option for

(1) simple sorts (alphabetical, compound alphabetical)

(2) complex sorts (derived attributes, date-time manipulations, etc.)
Mar 28 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Bishop | last post: by
5 posts views Thread by yefei | last post: by
3 posts views Thread by Marc Grutte | last post: by
3 posts views Thread by Toni | last post: by
1 post views Thread by mmorrison93 | last post: by
reply views Thread by Sobin Thomas | last post: by
1 post views Thread by Sobin Thomas | last post: by
reply views Thread by =?Utf-8?B?R3JlZw==?= | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.