Página 1 de 1

QUIERO HACER UN METODO QUE CONTROLE LA EDICION DE LAS COLUMNAS DE UN BROWSE

Publicado: Jue Ene 29, 2009 3:22 pm
por BiSoft
PUDIERA SER DE ESTE TIPO
EL PROBLEMA ES QUE NO ME ENTRA EN EDICION DE LA PRIMERA COLUMNA .
ES DECIR CUANDO Nk VALE 1 NO EJECUTA :EDIT()
¿QUE HAGO MAL?
UN SALUDO Y GRACIAS
METHOD EditLinea(nLin)
local nK := 1
local aDatosLin := {}
nLin := ::oBrowse:nArrayAt
//--- Copio datos actuales
aDatosLin := ::oBrowse:GetRow()
//--- Bucle de Edicion -----
do while nK <= len(::oBrowse:aCols)
with object ::oBrowse:aCols[nK]
if :nEditType != beNONE
if :Edit()
//--- Controles
do case
case nK == 1 //Codigo
if :oGridEdit:Value == 0 .or. :oGridEdit:Value >
len(::aArtic)
MsgAlert("Codigo inexistente","!!! Atencion !!!")
loop
else
::aPrecios := ::aArtic[:oGridEdit:Value,3]
endif
case nK == 7
if :oGridEdit:Value == "N"
if MsgNoYes("Desea abandonar la edicion?","Por
favor...")
for nN := 1 to len(aDatosLin)
oSender:oParent:SetValue(nN,aDatosLin[nN])
//Recupero valores originales
next nN
else
nK := 1
loop
endif
endif
endcase
endif
endif
end with
::CalLinea(nLin)
nK ++
enddo
RETURN NIL

QUIERO HACER UN METODO QUE CONTROLE LA EDICION DE LAS COLUMNAS DE UN BROWSE

Publicado: Vie Ene 30, 2009 12:15 pm
por ignacio
BiSoft,
Es tremendamente complicado seguir su código, lo siento. Le ruego que nos
mande un pequeño ejemplo que muestre su problema.
Un saludo
--
Ignacio Ortiz de Zúñiga
Xailer support / Soporte de Xailer
http://www.xailer.com
http://www.xailer.info
"BiSoft" <bisoft@bisoft.es> escribió en el mensaje
news:4981bbc1$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
> PUDIERA SER DE ESTE TIPO
>
> EL PROBLEMA ES QUE NO ME ENTRA EN EDICION DE LA PRIMERA COLUMNA .
> ES DECIR CUANDO Nk VALE 1 NO EJECUTA :EDIT()
>
> ¿QUE HAGO MAL?
>
> UN SALUDO Y GRACIAS
>
>
> METHOD EditLinea(nLin)
> local nK := 1
> local aDatosLin := {}
>
> nLin := ::oBrowse:nArrayAt
>
> //--- Copio datos actuales
> aDatosLin := ::oBrowse:GetRow()
>
> //--- Bucle de Edicion -----
> do while nK <= len(::oBrowse:aCols)
> with object ::oBrowse:aCols[nK]
> if :nEditType != beNONE
> if :Edit()
> //--- Controles
> do case
> case nK == 1 //Codigo
> if :oGridEdit:Value == 0 .or. :oGridEdit:Value >
> len(::aArtic)
> MsgAlert("Codigo inexistente","!!! Atencion !!!")
> loop
> else
> ::aPrecios := ::aArtic[:oGridEdit:Value,3]
> endif
> case nK == 7
> if :oGridEdit:Value == "N"
> if MsgNoYes("Desea abandonar la edicion?","Por
> favor...")
> for nN := 1 to len(aDatosLin)
> oSender:oParent:SetValue(nN,aDatosLin[nN])
> //Recupero valores originales
> next nN
> else
> nK := 1
> loop
> endif
> endif
> endcase
> endif
> endif
> end with
> ::CalLinea(nLin)
> nK ++
> enddo
>
> RETURN NIL
>