Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using GRID to enter data
Message
From
09/04/2008 03:05:59
 
 
To
08/04/2008 22:04:24
Fabian Borghi
Xenon Information Technology
Itaparica, Brazil
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 8
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01309223
Message ID:
01309237
Views:
8
Hi Fabian,

instead of using several interactivechange methods with same code you could try it with bindevent().
In case your grid is an individual class add a method called 'CalculateSum'
in grid.init, otherwise add this method i.e. to your form. Then you bind all needed textboxes like this:
BINDEVENT(Thisform.Grid1.Column3.Text1,[LostFocus],Thisform.Grid1,[CalculateSum])
BINDEVENT(Thisform.Grid1.Column4.Text1,[LostFocus],Thisform.Grid1,[CalculateSum])
BINDEVENT(Thisform.Grid1.Column5.Text1,[LostFocus],Thisform.Grid1,[CalculateSum])
BINDEVENT(Thisform.Grid1.Column6.Text1,[LostFocus],Thisform.Grid1,[CalculateSum])
Then within your Method 'CalculateSum' all you have to do is calculate the cursor's field values and write back into the cursor's target field and don't use the textbox values for calculation.
Best Regards
-Tom

Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it.

Oh, and BTW: 010101100100011001010000011110000101001001101111011000110110101101110011
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform