Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using This.Parent.Parent in a Grid
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00546633
Message ID:
00546636
Vues:
13
Hi!

When grid refreshed, the Value property of non-current column text box (or other control) is updted for each row, so you will have there whatever is in last refreshed row. Use another approach:

This.Parent.Parent.Column3.Text1.value =;
evaluate(This.Parent.Parent.Column1.Text1.ControlSource * This.Value).

It is recommended to work with current record fields instead of control properties in the grid.

>Can someone explain why the following will not give you the information expected.
>
>Example: A grid with 3 columns, one uses the down arrow to advance from row to row in column2 and as a value is entered in Column2 the following calculation is made for column3
>
>This.Parent.Parent.Column3.Text1.value =;
> This.Parent.Parent.Column1.Text1.Value * This.Value
>
>will not work unless the command:
>This.Parent.Parent.Column1.Text1.Refresh() is issued before the above command.
>
>Thanks in advance.
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