![Image](https://i.postimg.cc/g2D7Tr4V/102.png)
:nEditTypes := EDIT_GET
the user can insert numbers But I wish the use can insert only number of two digit from 1 to 90
How I can resolve ?
Code: Select all | Expand
:bEditValid := {| oGet | if(oGet:value > 0 .and. oGet:value < 91,.t.,(MsgInfo("Solo 0 a 90"),.f.)) }
cmsoft wrote:Puedes usar bEditValidCode: Select all | Expand
:bEditValid := {| oGet | if(oGet:value > 0 .and. oGet:value < 91,.t.,(MsgInfo("Solo 0 a 90"),.f.)) }
Code: Select all | Expand
For n=1 to len(oBrw:aCols)
oBrw:aCols[n]:bEditValid := {| oGet | if(oGet:value >= 0 .and. oGet:value < 91,.t.,;
(MsgInfo("Solo da 0 a 90"),.f.)) }
END
Please try this alternativeBut it must erase the edit
Code: Select all | Expand
#include "fivewin.ch"
function Main()
local aData := Array( 10, 10 )
AEval( aData, { |aRow| AFill( aRow, 0 ) } )
XBROWSER aData FASTEDIT SHOW RECID SETUP ( ;
oBrw:bEditValues := { |x,o| If( x == nil, o:oBrw:aRow[ o:nCreationOrder ], ;
If( x >= 0 .and. x < 91, o:oBrw:aRow[ o:nCreationOrder ] := x, nil ) ) }, ;
oBrw:cEditPictures := "@Z 99" ;
)
return nil