Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Changing local view order in grid
Message
From
14/04/2008 10:27:26
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01310252
Message ID:
01310392
Views:
16
Thanks Naomi

"indexes on the fly" sounds good. My short term problem is resolved, but I expect to be generalizing things (in my grid class) next weekend.

Bob


>Hi Bob,
>
>I found one version on my class for the similar purpose in this Re: Active Cell colors and grid row colors Thread #1047803 Message #1048061
>
>Didn't check how recent this code is, but I remember it allows to add indexes on the fly.
>
>>>>I’m using a local view that is populated from multiple tables as the RecordSource for a 3 column grid. It’s working fine, but I want to allow the user to change the ORDER presented dynamically by clicking on the respective grid header.
>>>>
>>>>I have coded the SQL's ORDER clause by setting it as a ?parameter. I change the parameter, do a requery(), and then a refresh() all in the header click method. I'm bumping into pop-up messages asking what value I want for my parameter.
>>>>
>>>>What general approach should I be using?
>>>>Bob
>>>
>>>I would recommend a sortable grid. For example, Re: Adding code to event Thread #1276895 Message #1276900
>>
>>Thanks Sergey
>>
>>On reading through the referenced code, I saw that you were using indexes that were already created to control the displayed order, where I was trying to change the SQL ORDER BY clause. I gave up on my approach, created 3 indexes, and got everything to work fine with SET ORDER TO. As this was my first try at dynamically reordering a local view in a grid, I hand coded it to make sure that I understood what was going on. I'll look at implementing the class code that you referenced later.
>>
>>Bob
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform