Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Multi column sorting in grid
Message
From
21/10/2011 17:39:20
 
 
To
21/10/2011 15:34:50
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01526657
Message ID:
01527076
Views:
79
>>>>>>>>>Marcia's class is an easy to use and a must-have in case you can't find it and Marcia allows I could supply you the code.
>>>>>>>>>
>>>>>>>>>Go for it! One less thing for me to do <g>
>>>>>>>>
>>>>>>>>Frank,
>>>>>>>>Here we go, with thanks ro Maria:
>>>>>>>>Koen
>>>>>>>
>>>>>>>Hi Koen,
>>>>>>>
>>>>>>>are there any instructions on how to use it available? I've created a form, added a table to the DE, dropped the grid class on the form and set the recordsource and controlsources, but I get an error:
>>>>>>>
>>>>>>>class definition SORTINGINDICATOR is not found
>>>>>>>
>>>>>>>on this line:
>>>>>>>
>>>>>>>.parent.AddObject(.cIndicator, "SortingIndicator")
>>>>>>>
>>>>>>>so I SET CLASSLIB TO sortgrid.vcx
>>>>>>>
>>>>>>>Which got past that error, then I got this one:
>>>>>>>
>>>>>>>class definition SORTHEADER is not found
>>>>>>>
>>>>>>>but I don't know where that class definition resides.
>>>>>>>
>>>>>>>Can you help?
>>>>>>
>>>>>>Looks like you also need these two classes - may be Koen forgot to send them.
>>>>>
>>>>>That is correct (almost), the code didn't do a SET CLASSLIB for the first one, but the second class is definitely not in the files Koen sent me.
>>>>
>>>>Frank,
>>>>
>>>>It seems I have forwarded only have of the files. Have now rearranged, made a working sample, plse try this zip.
>>>>
>>>>Regards,
>>>>
>>>>Koen
>>>
>>>Thanks Koen,
>>>
>>>how do I sort by multiple columns using this?
>>
>>Frank,
>>
>>Click on the header
>>
>>Regards,
>>
>>Koen
>
>Koen,
>
>yes, that sorts it by one column, but how do I sort by multiple columns?

Frank,

I dont think this is in this class. You can only sort on 1 column. The class is making an index on the column descending or ascending (single / double click) what you require it to build a compound index on a number of fields and than dynamically - whow that would be great! I believe to achieve that you shall have to built a special indexing form in which you let the user indicate which columns to use and which one to be the main index.

The whole logic and routine of Marcia's class is very straightforward and to be found in the procedure Sortheader.prg

Regards,

Koen
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform