On Wed, 18 Aug 2004 06:19:09 -0700, IGotYourDotNet wrote:
I'm only doing
sub datagrid1_sortcommand()
bindGrid(e.sortExpression)
end sub
the bindGird calls Stored Procedures to bind the datagrid
Its sorts the grid, sort of, i need in asc and desc when I click the column.
"Oytun YILMAZ" wrote:
On Wed, 18 Aug 2004 05:59:01 -0700, IGotYourDotNet wrote:
I'm trying to sort my grid and its working halfway, I can only sort the grid
once and it puts everything in ASC order (1234555666) and i can't sort it
again to display as DESC order (6665554321),
what could be causing this?
Did you switch your sorting expression like below ?
"ColumnFOO" - "ColumnFOO Desc"
If you could post your grd_SortCommand I could help more
- Oytun YILMAZ
if your column name is FOO then you always call bindGird("FOO") You should
change your bindfunction place another parameter and a viewstate to keep
your last sort order like this:
sub datagrid1_sortcommand()
if viewstate("LastSort")="ASC"
bindGrid(e.sortExpression,"DESC")
viewstate("LastSort")="DESC"
elseif viewstate("LastSort")="DESC"
bindGrid(e.sortExpression,"ASC")
viewstate("LastSort")="ASC"
end sub