473,396 Members | 1,765 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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
1 1928
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: ck388 | last post by:
For some reason when I enable the callback feature of the gridview I still get a page refresh, that is it seems like there is a postback that occurs, not a callback which is just supposed to update...
4
by: Bishop | last post by:
I want to find out if there is a way to use the gridview to list products simular to the listing on this page:...
5
by: yefei | last post by:
In my web design, I display records from a SQL DataBase according to some filters the GridView is defined with select commands and selest parameters however, I also want to display all records...
3
by: Marc Grutte | last post by:
Hi I am trying to bind a custom datasource to a gridview whilst paging is enabled. What is missing in this code to make the paging + binding work? thanks M <%@ Page Language="VB" %>
3
by: Toni | last post by:
In DataGrid and GridView I can't use paging and sorting. I am connected to database with code, not visual. Can I use paging and sorting if I populate data to grid with code, or I need to drag and...
1
by: mmorrison93 | last post by:
I've created my own custom gridview that derives from the System.Web.UI.WebControls.GridView class and am trying to implement my own sorting and paging mechanisms. The GridView class has two...
0
by: Sobin Thomas | last post by:
Hi All, How can I bind the Gridview control to Sql Datasource control on a button click(I see majority of the articles binding datasource at page load) I need to enable the paging and sorting of...
1
by: Sobin Thomas | last post by:
Hi All, How can I bind the Gridview control to Sql Datasource control on a button click(I see majority of the articles binding datasource at page load) I need to enable the paging and sorting of...
0
by: =?Utf-8?B?R3JlZw==?= | last post by:
I've been playing around with the GridView and for the most part am able to achieve most of what I need to. I am having just one problem and that's with the Sorting and Paging options. If I use a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.