Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem with DynamicBackColor
Message
De
10/11/2020 16:27:53
 
 
À
10/11/2020 16:19:01
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01677077
Message ID:
01677097
Vues:
51
Ok...I was wrong...right in that the .DynamicBackColor property was empty, wrong in what was causing it. It seems code in the framework (VMP) turns back and does not fire all of its .Init() methods if there is no record source upon grid instantiation. I found a note in the source that says "if there is no record source for the grid, assume it is a prototype and stop running the Init code" - and my code that sets the dynamic back color is in one of these lower level method calls. So it is not something weird VFP is doing - it is the framework.

I just need to change the order of when this property is assigned for each column so that it happens after the view is populated and the columns bound to the view. Or something like that.

Thanks all.
Albert

>If re-setting the DynamicBackColor value after assigning records works then great. But in my grid I have in the Init of the grid the creation of the cursor to hold the data (which now has no records), the setting of the grid binding to the cursor fields for each column, the restore of the column widths and display order, and finally the DynamicBackColor setting. At this point the grid has no records. In another place I have the code to query the backend tables via SQL into a temporary cursor. Then I append this temporary cursor to the cursor created in the grid's Init() event. I never have to reset the DynamicBackColor value.
>
>If you do a SQL directly to the cursor set for the grid, then the grid does loose all the property settings.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform