473,386 Members | 1,736 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,386 software developers and data experts.

Paging and Sorting in Datagrid

I have a datagrid control in a web application in which I
have both paging and sorting enabled. The sorting works
only on the current page. If I am on page 1 and sort by
any field, the page displays the records sorted properly.
If I go to the next page the records on that page are not
sorted.

The datagrid is bound to a dataview. I set the sort on
the dataview in the sort event.

I have also tried to set the sort on the datagrid in the
page changed event using a session variable set in the
sort event but it still shows any page except the page I
sort, unsorted.

Any idea what I am not doing?

Billy Jacobs
Jul 19 '05 #1
1 2332
Figured it out myself.

Billy
-----Original Message-----
I have a datagrid control in a web application in which Ihave both paging and sorting enabled. The sorting works
only on the current page. If I am on page 1 and sort by
any field, the page displays the records sorted properly.If I go to the next page the records on that page are notsorted.

The datagrid is bound to a dataview. I set the sort on
the dataview in the sort event.

I have also tried to set the sort on the datagrid in the
page changed event using a session variable set in the
sort event but it still shows any page except the page I
sort, unsorted.

Any idea what I am not doing?

Billy Jacobs
.

Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Dave S | last post by:
Hi, I'm using a datagrid to display contents of a dataset and I've set the datagrid to allow paging and sorting. Rather than re-retrieve from the DB, I store the original dataset in a Session...
2
by: Hajime Kusakabe | last post by:
Hi. I have created a datagrid (datagrid1) without any columns on a aspx page. Then aspx.vb adds columns from a database. It is somthing like this .... ================================== Dim...
2
by: enak | last post by:
I can not get my datagrid to page. I have a datagrid that I can sort 2 of the columns. This works great. I added paging and when I display the dg it shows 5 pages. (I am showing page numbers at...
1
by: Guoqi Zheng | last post by:
Sir, The default paging of datagrid is somehow use too much resource, so I am using Stored procedure for the paging. You can find my Stored procedure at the end of this message. It works...
2
by: Luis Esteban Valencia | last post by:
I have a data grid control with a templated checkbox column residing in a asp.net user control. The checkbox boolean state determines if the item is later added or removed from another database...
8
by: Matthew Curiale | last post by:
I am creating an app that lists clients of a company for management of different attributes for that company. The first page is a listing of the companies currently in the database. I have my...
2
by: saleek | last post by:
Hi, I am trying to figure out why my datagrid has stopped firing the page and sort commands. Scenario: I originally had template columns in my datagrid and had set up custom bi-directional...
5
by: LDD | last post by:
Hi Folks I'm trying to determine a way to handle paging, filtering and sorting in a datagrid. If I choose to filter and sort, I'd like to return a subset. If that resultset has more records...
2
by: Kuldeep | last post by:
Hi All, I have been trying to find some algorithms for datagrid sorting and paging. Please help Regards Kuldeep
5
by: Donald Adams | last post by:
Hi, I will have both web and win clients and would like to page my data. I could not find out how the datagrid control does it's paging though I did find some sample code that says they do it...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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,...

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.