by AOKISANTOS » Thu May 17, 2007 8:26 pm
Julio, talvez te ajude!
uBrw:aCols[03]:cHeader := "Valor"
uBrw:aCols[03]:nWidth := 70
uBrw:aCols[03]:cEditPicture := "@E 999,999.99"
uBrw:aCols[03]:nDataStrAlign := AL_RIGHT
uBrw:aCols[03]:nHeadStrAlign := AL_RIGHT
uBrw:aCols[03]:nFootStrAlign := AL_RIGHT
uBrw:aCols[03]:bOnPostEdit := {|o,x| bStruc[uBrw:nArrayAt, 3 ] := x }
uBrw:aCols[03]:bStrData := {|| TRANS(bStruc[uBrw:nArrayAt, 3 ] ,"@E 999,999.99")}
uBrw:aCols[03]:bEditValue := {|| bStruc[uBrw:nArrayAt, 3 ] }
uBrw:aCols[03]:nEditType := EDIT_GET
uBrw:aCols[03]:bEditValid := {|oGet| Validando( oGet,uBrw ) }
**************************************
STATIC FUNCTION Validando( oGet,uBrw )
**************************************
local lValRet:=.T.,X,valtota1:=0,valtota2:=0
local bValid := oGet:bValid
local nVal := oGet:Value()
oGet:bValid := nil
oGet:bValid:=bValid
FOR X:=1 TO LEN(bStruc)
valtota1+=round(bStruc[x][3],2)
valtota2+=round(bStruc[x][6],2)
NEXT
uBrw:aCols[3]:cFooter:= trans(valtota1,"@E 999,999.99")
uBrw:aCols[6]:cFooter:= trans(valtota2,"@E 999,999.99")
uBrw:refresh()
RETURN lValRet
Fique com Deus
Aoki
FWH25+XHARBOUR 99.50