Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with DynamicBackColor
Message
From
11/11/2020 11:37:54
 
 
To
11/11/2020 10:25:13
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01677077
Message ID:
01677107
Views:
66
Right. if you add the grid to the form when there is nothing open in the "underlying" workspace, the recordsource is empty when queried. So that's why the default framework (VMP) code was turning back and not firing the rest of its setup methods (which is not the best design, but then the codebase for VMP has not been updated for probably a decade; I suspect that this would have been re-engineered at some point to not do this but to only turn back if some development mode flag said so).

Albert

>Nice trick. So
>
>USE companys
>SELECT 0
>loform=CREATEOBJECT("form")
>
>
>creates a grid w/o anything?
>
>>Just a quick update - I did not know this before but if you instantiate a grid on a form, it *assumes* the recordsource whatever table/view is open in the current workspace if you do not specify this specifically in the setup e.g.
>>
>>
>>USE companys
>>loform=CREATEOBJECT("form")
>>loform.AddObject("TestGrid","grid")
>>? loForm.testgrid.RecordSource
>>
>>
>>Result: .Recordsource = "companys"
>>
>>I would have thought .Recordsource would be empty if not explicitly set on the designer screen.
>>
>>Albert
Previous
Reply
Map
View

Click here to load this message in the networking platform