473,563 Members | 2,732 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Ascending & Descending sort in datagrid

How do you make a sort work in ascending & descending order on the column in
a datagrid.

I have it now where it'll return the numbers from lowest to highest.

SC

Nov 18 '05 #1
2 2164
"Steve Chatham" <me@privacy.net > wrote in
news:ut******** *****@TK2MSFTNG P12.phx.gbl:
How do you make a sort work in ascending & descending order on the
column in a datagrid.

I have it now where it'll return the numbers from lowest to highest.


You need to define a sort formula. I dont rememember off hand how to do this,
but if you take a quick look in the docs for it you'll find it quickly with
an exmaple to boot.
--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programmin g is an art form that fights back"
Nov 18 '05 #2
Steve
This is a great article on how to customize the asp.net datagrid

http://www.msdn.microsoft.com/msdnma...ng/default.asp

Suresh

----- Steve Chatham wrote: ----

How do you make a sort work in ascending & descending order on the column i
a datagrid

I have it now where it'll return the numbers from lowest to highest

S


Nov 18 '05 #3

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

Similar topics

0
4085
by: renster | last post by:
I have been looking at implementing the following but with a difference. http://forums.devshed.com/t47653/s.html This example uses a link which works with some code shown on the page. I have a form that is submitted to itself and a drop down list that lets users select which table field they want to sort by. This is for a form that...
1
5477
by: Seansan | last post by:
Hi there, I am trying to sort an array hash on values. I pass a FORM tag and resolve it to the array position to sort on. (see code below). Is there an easy way to sort ascending or descending based on a new FORM value like ASC or DESC? How would I add this functionality? I know I have to swap $a and $b, but I have no idea where or rather...
1
3485
by: AwanJohnie | last post by:
I have an XML doc and successfully transformed into a table using XSL. The Challenge is how to sort the information by columns. I am writting diffrent XSL for the diffrent sorts (i.e per column) but I can't just get the basic one to work. I get no errors but the data is not sorted. Please help. 1. To order by Title===@name 2. To Order by...
0
1245
by: Alex | last post by:
I found some good information On "Ascending and Descending Sorting of Columns in an ASP.NET DataGrid..." at this site http://www.dedicatedsolutions.co.uk/DesktopDefault.aspx?tabid=62 It is worth the click
2
3090
by: Joe | last post by:
Hi, I have an asp.net script that connects to MS Access database and displays data in a table. For some reason I am do not know how to display data say in ascending order of column1. I have pasted below the script that I am using. I will appreciate if someone can give me a clue as how to sort data in ascending or descending order when...
1
5749
by: Mark | last post by:
Rather than have only one column sorted in a single direction in a listview. I would like to be able to sort on any column in alternating directions (ascending,descending) eg. First column click sorts ascending and second sorts decending etc. Can anyone point me in a direction? Thanks, Mark
1
1776
by: Richard | last post by:
The obvious way to do it is ListView1.Sorting = SortOrder.Ascending 'or SortOrder.Descending But, I've made my own IComparer, cause it shall sort in a different way, and then the above codeline doesn't seem to work. Anyone who knows why?? Richard
11
18277
by: dwelden | last post by:
I have successfully used the sort lambda construct described in http://mail.python.org/pipermail/python-list/2006-April/377443.html. However, how do I take it one step further such that some values can be sorted ascending and others descending? Easy enough if the sort values are numeric (just negate the value), but what about text? Is the...
6
3707
by: reon | last post by:
Here is my source code.... And any one pls help me how can we find the output integers sort by ascending and find there average... #include<iostream.h> #include<conio.h> void main() { int num; clrscr(); cout<<"ENTER NUMBERS TO SORT THEM IN ASCENDING ORDER & FIND THE AVERAGE"<<endl; for(int times=0;times<=10;times++)
0
7664
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7583
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8106
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7948
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5484
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5213
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3642
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2082
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.