473,398 Members | 2,812 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,398 software developers and data experts.

Single Page Sorting

I am currently using a DataGrid to display a list of Top 20 Customer
Accounts that are sorted by a sales value. These results are retrived
from an ObjectDataSource

From this list I want to sort the results by for example Customer Name,
since I am only displaying the 1 page of data is it possible for this
sort to be performed without the grid control rebinding to the database,
or does the Grid need to rebind on every sort?

Any Help would be most appreciated.

Stuart

*** Sent via Developersdex http://www.developersdex.com ***
Oct 17 '07 #1
2 1102


The way I did this is to ... cache the data ... which is the source of the
ObjectDataSource.

Then on the "Sort By Customer Name", I retrieve the cached data.
I bind it to the ObjectDataSource.

I don't have the code with me, but it took some tinkering.

Why are you using a DataGrid in 2.0?
Move up to the GridView, you'll be much happier.

...


"Stuart Ferguson" <st**************@btinternet.comwrote in message
news:e0**************@TK2MSFTNGP03.phx.gbl...
>I am currently using a DataGrid to display a list of Top 20 Customer
Accounts that are sorted by a sales value. These results are retrived
from an ObjectDataSource

From this list I want to sort the results by for example Customer Name,
since I am only displaying the 1 page of data is it possible for this
sort to be performed without the grid control rebinding to the database,
or does the Grid need to rebind on every sort?

Any Help would be most appreciated.

Stuart

*** Sent via Developersdex http://www.developersdex.com ***

Oct 17 '07 #2
Sorry i am not using the ASP.Net standard grid (data grid or gridview) i
am using a custom grid control.

*** Sent via Developersdex http://www.developersdex.com ***
Oct 18 '07 #3

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

Similar topics

4
by: dont bother | last post by:
This is really driving me crazy. I have a dictionary feature_vectors{}. I try to sort its keys using #apply sorting on feature_vectors sorted_feature_vector=feature_vectors.keys()...
3
by: Brett P. | last post by:
Hello, I am trying to have only one column sortable within a data grid. I know you set the allow sorting property to true on the style, but this enables sorting for all columns. Is there a way...
1
by: pemigh | last post by:
I have a report with pages breaking in the middle of text box controls. And it's not just on a line-by-line basis, but sometimes (in a situation that I can no longer recreate) just the bottom...
3
by: Regnab | last post by:
I've made an access report which shows the number of people in 5 activities. As you can imagine, it only takes up about a quater of the page. I have to give a copy of this report to two people, and...
0
by: brett p | last post by:
Hello, I am trying to have only one column sortable within a data grid. I know you set the allow sorting property to true on the style, but this enables sorting for all columns. Is there a way...
2
by: Robert Fitzpatrick | last post by:
I have varchar column with both numbers and letters, like 1 thru 10 and 5A thru 5G, they are unit numbers for apartments. If I have 1 thru 100, since it is a varchar field, it sorts like 1,10,11......
1
KevinADC
by: KevinADC | last post by:
Introduction In part one we discussed the default sort function. In part two we will discuss more advanced techniques you can use to sort data. Some of the techniques might introduce unfamiliar...
8
by: stoogots2 | last post by:
I would like to reuse the code for gridview sorting for each of the several GridViews that I have on one page. I've not done this before, so I am seeking a more elegant and reusable solution than...
5
by: jrod11 | last post by:
hi, I found a jquery html table sorting code i have implemented. I am trying to figure out how to edit how many colums there are, but every time i remove code that I think controls how many colums...
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
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.