Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid order
Message
From
11/05/2016 02:09:34
 
 
To
10/05/2016 15:59:04
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01636103
Message ID:
01636136
Views:
73
In VFP a string containing a chr(0) isn't considered empty. But it may very well behave the same way in this case, I haven't tried.

>Hi Tore,
>
>yes indeed: chr(0) is of course an empty string.
>
>Thanks: it's always nice when faint memories really are memories. :)
>
>Hank
>
>>Are you referring to setting recordsource to an empty string? That will work as long as the field order in the grid is exactly the same as the field order in the table.
>>
>>>Hi Tamar,
>>>
>>>I have a faint memory (like all the rest <s>) of you coming up with a neat trick, back in the day, for keeping the formatting of the grid while changing the recordsource. My memory is of setting the recordsource to chr(0), but I don't remember if there were other parts. Of course this could have been pre-VFP, back in the 2.6 days.
>>>
>>>Hank
>>>
>>>>>I have a grid on a form, which services a number of files with exactly the same structure. Problem I am having is that I can't set the order programmatically. At the start the order is fine, but change the RecordSource, and try to set order, and nothing happens. I can put code in the header of a column, and physically click it, and then the order will change correctly, but if I click that header programmatically, it triggers the messagebox() I have there saying 'we are here!', but the code doesn't run. Click the header with the mouse, and it runs great. I am sure someone has battled this demon before. Thanks for your help!
>>>>
>>>>The problem is that you're changing the RecordSource. That removes all customization of the grid.
>>>>
>>>>To have code that persists when you change the RecordSource, it needs to be in the grid class, not the grid object.
>>>>
>>>>Tamar
Previous
Reply
Map
View

Click here to load this message in the networking platform