Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem with DynamicBackColor
Message
De
11/11/2020 11:37:54
 
 
À
11/11/2020 10:25:13
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Allemagne
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01677077
Message ID:
01677107
Vues:
64
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform