Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Multi column sorting in grid
Message
From
25/10/2011 19:39:09
 
 
To
25/10/2011 09:12:11
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01526657
Message ID:
01527377
Views:
70
>>>>Hi,
>>>>
>>>>has anyone implemented a way to allow users to sort by any combination of columns displayed in a grid?
>>>>
>>>>I would like to allow my users to click on a column and the grid gets sorted by that column (this is implemented already) then if they want to add another column to the sorting, they can ctrl+click on the next column so the order will be by the first column, then the second column and so on.
>>>
>>>
>>>Hi Frank,
>>>
>>>I have show the 'clue' in foxite (id:onytoo), why not you just create by your self?
>>>Check this link, this is a simple example:
>>>
>>>http://www.ziddu.com/downloadlink/16957956/multicolumnsort.rar
>>>
>>>
>>>Regards,
>>>Ony
>>
>>Hi,
>>
>>I was curious to learn how you had solved this problem. It works ok however you should either review the code or make a little changement not allowing to move the grid columns as when you do that with this class you will get unwanted results.
>>
>>Update:
>>
>>easy fix:
>>
>>replace the 1st endif in the method dosort to the bottom line of that method So donot rebuilt the grid when you only have moved a column.
>>
>>Regards,
>>
>>Koen
>
>Ehhe hee.heee hee.....
>As I told before, this is just a simple example, not yet benefit for production.
>You can use that code logic and make it better for your own purpose, I let it to you.
>
>Regards,
>Ony

Ony,

Just to make it clear, I judge this as a best coding example, the mentioned bug while moving the columns nothing serious. Thanks for sharing!

Regards,
Koen
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform