Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid Question...
Message
De
23/08/1999 10:45:33
 
 
À
23/08/1999 10:23:09
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00256561
Message ID:
00256573
Vues:
23
>>I'm taking a look at a poject a fried of mine is working on in which he has a grid that he performs line by line calculations in. The calculations are done during a lost focus in one of the columns that updates another column further to the right of the active cell. The issue that is coming up is that when there are more than one row and he arrows from left to right and then down arrows to the next line, the calculations are firing with a value from the previous row instead of the active row. For Example:
>>
>>Qty Price Total
>>1 1.00 1.00
>>2 2.00 4.00
>>
>>When you arrow through the grid (up/down/left/right, etc.) He gets the following occring if he arrows left to right from qty after arrowing through line 1:
>>
>>Qty Price Total
>>1 1.00 1.00
>>2 2.00 2.00
>>
>>The calculation is in the lost focus of Qty and references the price columns value to calculate the total.
>>
>>The only way this actually works is to arrow through the entire line to get the correct total. It seems as though the Column reference is only updating when it has been the active cell.
>>
>>Now the question of the day <g>...how do you reference a columns value of the active row if you haven't made it an active cell prior to the calculations?
>>
>>Does any of this make any sense that I have written. A little confusing to me as well. <g>
>>
>>Thanks for any assistance.
>
>I use directly field names (activerow is not thrustable here because in lostfocus it's 0). Why not simply set controlsource to Qty*Price and remove lostfocus code ?
>Cetin

Sometimes the most obvious answer is the most simplest and the easiest to overlook! <bg> Thanks, I'll have him try it and see if it works out.
Patrick L. Stovall
Senior Architect/Developer
MCP - C#

VeroQuest
P.O.Box 7216
Kalispell, MT 59904
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform