Information générale
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Network:
Windows 2003 Server
Hello again Edward
unfortunatly, i can put my grid work properly and i will again your help.
I am go to try to explain better what i want:
my GRID design
-------------------------------------------------------------------------------------
article gross weight(a) %moistness(b) valueofmoistness(c) quantity(d)
-------------------------------------------------------------------------------------
1 12000,00 5 600,00 11400,00
Controlsource of each field on my invoive line table FI
Gross weight : table field FI.u_nospeso
%moistness : table field FI.U_HUM
valueofmoistness : table field FI.U_VALHUM
quantity : table field FI.QTT
EVENT i have available in this program : AFTERROCOLCHANGE
i pretend when i insert 5% on %moistness(FI.U_HUM) the column field valueofmoistness(FI.U_VALHUM) is calculate automatically : gross weight * 5/100 then Quantity is 12000-600=11400
this following code do that :
STORE "" TO clname
STORE " " TO PERNAME
FOR EACH myform IN _Screen.forms
IF UPPER(myform.name)="SFT"
WITH myform.Pageframe1.Page1.Cont1.Grid1
FOR i=1 TO .columnCount
IF UPPER(.Columns(i).ControlSource)="FI.U_VALHUM"
clname=.Columns(i).name
.columns(i).text1.lostfocus()
.Columns(i).text1.value = ((fi.u_nospeso)*fi.u_hum)/100
exit
ENDIF
NEXT i
EXIT
ENDWITH
ENDIF
NEXT myform
But also i want when i change the value of the column valueofmoistness(FI.U_VALHUM), automatically the column field %moistness(FI.U_HUM) is recalculate.
I try many things without sucess. I feel that if i don´t know on what column index number or activecell i have the focus when this column loose the focus the software don´t know what column it must bring up to date.
In fact , in this moment is my BIG problem because only with this code i can´t do that.
Really, i don´t know how can do this and i hope sincerely that you have a great ideia to resolve this problem.
I expect as soon has possible your advise
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement