Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problems with variable reference to recordsource in grid
Message
 
 
À
17/02/2001 17:03:50
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00477049
Message ID:
00477132
Vues:
29
Hi!

All that you aske for could be handled using _Assign and _Access methods. In the class designer you can check checkboxes 'Assign' and 'access' to add these methods or add them manually like 'PropertyName_Access'. These methods will be fired automatically each time something assigned to the property in code or something accessed (taken a value from property). This way, for example, you can forward assignment to the property to the real RecordSource property of the grid when value assigned to the property of container. You can make a checking for valid value of record source in the assign method and prohibit change if it is not valid (RecordSource of grid is character only and it is either alias, table or SQL Select statement).


>I am attempting to make my grid more generic and accept any recordsource. The grid is inside a container. (The container/grid and other controls are a class in my library) I would like to have the recordsource for the grid be specified by setting a property of the container. Then all other controls, in the container and the grid as well, can reference that property value. But I am having problems. I don't know when the record source is evaluated.
>Say for example that the container has the value: cursurques
>Dumb question: How does VFP evaluate whether a value in a property is character or numeric or a variable itself ? Shouldn't =somvar evalutate the variable,
>whereas something like cursurques evaluates to the string cursurques ?
>
>What value should go in my container property , for a table or cursor alias ?
>
>What value should go in the recordsource property for the grid, ie. how do I reference the cursor or table alias in the container property ?
>
>If I change the value in the container property at runtime, when/how will the recordsource property know when to reevaluate recordsource property of the grid ?
>
>TIA
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform