codigo q uso en grid
Publicado por mario (90 intervenciones) el 30/01/2009 15:42:45
este es el codig que utilizo en el text del grid aver si alguien encuentra el problema por que yo no encuentro
LPARAMETERS nKeyCode, nShiftAltCtrl
IF nKeyCode = 13 &&enter
SELECT aux_ven
replace aux_ven.det_cant WITH 0
replace aux_ven.det_grav WITH 0
replace aux_ven.det_gravA WITH 0
replace aux_ven.det_exen WITH 0
STORE 0 TO ThisForm.txtexen.Value
STORE 0 TO ThisForm.txtgrav.Value
STORE 0 TO ThisForm.txtgravA.Value
STORE 0 TO totexen
STORE 0 TO totgrav
STORE 0 TO totgravA
STORE 0 TO ThisForm.txtdto.Value
STORE 0 TO ThisForm.txttot.Value
DO FORM _busprod01
ENDIF
**INGRESAR OTRO REGISTRO EN LA GRILLA
IF nKeyCode = 22 &&enter
SELECT aux_ven
APPEND BLANK
ENDIF
**BORRAR UN REGISTRO DE LA GRILLA
IF nKeyCode = 7 &&borrar
SELECT aux_ven
DELETE
SELECT facturadetalle
GO top
ThisForm.GRID11.setfocus
sum(aux_ven.det_exen) to totexen
sum(aux_ven.det_grav)to totgrav
sum(aux_ven.det_gravA)to totgravA
ThisForm.txtexen.Value = totexen
ThisForm.txtgrav.Value = totgrav
ThisForm.txtgrava.Value = totgrava
ThisForm.txttot.Value = ThisForm.txtexen.Value + ThisForm.txtgrav.Value + ThisForm.txtgrava.Value
mercodigo = facturadetalle.producto_cod_producto
thisform.GRID11.refresh
thisform.Refresh
ENDIF
****envia a cantidad para ser cargada*****
IF mivar = 1 then
thisform.GRID11.column4.SetFocus
thisform.GRID11.Refresh
ENDIF
LPARAMETERS nKeyCode, nShiftAltCtrl
IF nKeyCode = 13 &&enter
SELECT aux_ven
replace aux_ven.det_cant WITH 0
replace aux_ven.det_grav WITH 0
replace aux_ven.det_gravA WITH 0
replace aux_ven.det_exen WITH 0
STORE 0 TO ThisForm.txtexen.Value
STORE 0 TO ThisForm.txtgrav.Value
STORE 0 TO ThisForm.txtgravA.Value
STORE 0 TO totexen
STORE 0 TO totgrav
STORE 0 TO totgravA
STORE 0 TO ThisForm.txtdto.Value
STORE 0 TO ThisForm.txttot.Value
DO FORM _busprod01
ENDIF
**INGRESAR OTRO REGISTRO EN LA GRILLA
IF nKeyCode = 22 &&enter
SELECT aux_ven
APPEND BLANK
ENDIF
**BORRAR UN REGISTRO DE LA GRILLA
IF nKeyCode = 7 &&borrar
SELECT aux_ven
DELETE
SELECT facturadetalle
GO top
ThisForm.GRID11.setfocus
sum(aux_ven.det_exen) to totexen
sum(aux_ven.det_grav)to totgrav
sum(aux_ven.det_gravA)to totgravA
ThisForm.txtexen.Value = totexen
ThisForm.txtgrav.Value = totgrav
ThisForm.txtgrava.Value = totgrava
ThisForm.txttot.Value = ThisForm.txtexen.Value + ThisForm.txtgrav.Value + ThisForm.txtgrava.Value
mercodigo = facturadetalle.producto_cod_producto
thisform.GRID11.refresh
thisform.Refresh
ENDIF
****envia a cantidad para ser cargada*****
IF mivar = 1 then
thisform.GRID11.column4.SetFocus
thisform.GRID11.Refresh
ENDIF
Valora esta pregunta


0