Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sorting by double clicking a column header
Message
From
31/07/2007 08:39:43
Mike Sue-Ping
Cambridge, Ontario, Canada
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Vista
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01244765
Message ID:
01244822
Views:
22
Hi Naomi,

I'm just curious about your generic sorting class. Can it handle multi-column sorting? If so, I'd be interested in how you coded it. I tried with some success but am looking for other ideas.

Mike

>>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
>
>Check Re: Hourglasses when clicking on the Header Thread #981532 Message #981682 for some pieces of code.
>
>I have grdSorting class which is quite generic. If you want send me an e-mail and I'll mail you the class.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform