Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Multi column sorting in grid
Message
De
21/10/2011 20:42:29
 
 
À
21/10/2011 17:39:20
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01526657
Message ID:
01527080
Vues:
59
>>>>>>>>>>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

LOL, that's where this whole conversation started, Marcia said:

"I have implemented this by using a "sort by" grid that contains user friendly names of fields in the grid's RecordSource and a column to specify "ascending or descending". It is a grid with mover bars that lets the user specify the order of the fields that are used to do the sorting. When they have the sort set up, they click a button that says "Sort Now"."

So I guess you misunderstood what she was talking about.

Marcia, please jump in :)
Frank.

Frank Cazabon
Samaan Systems Ltd.
www.samaansystems.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform