General information
Category:
Coding, syntax & commands
Title:
Sorting by double clicking a column header
Environment versions
Network:
Windows 2003 Server
I have a generic search screen that is called from my application from about 10 different places. I am trying to keep the routine generic so I don't have to hard code anything. Here is sample code for how the grid is populated:
CASE thisform.browsewhat = 'ORDERS'
SELECT order_browse
index on ordnum tag ordnum
locate
set near on
if empty(searchvalue)
searchvalue = order_browse.ordnum
if empty(searchvalue)
locate
else
seek(searchvalue)
endif
else
seek(searchvalue)
ENDIF
set near off
thisform.grid1.recordsource = 'order_browse'
thisform.grdrecno = recno('order_browse')
I would like to be able to have the user double click on a column heading and have it resort, but I am not sure how to do that without hard coding things. Here is the refresh routine for the form:
case thisform.browsewhat = 'ORDERS'
THISFORM.grdRecNo= RECNO("order_browse")
And the afterrowchange on the grid:
thisform.refresh
Any help would be greatly appreciated.
Thanks,
Randy
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only