using xbrowse bEditWhen

using xbrowse bEditWhen

Postby Marco Turco » Tue Oct 18, 2011 2:36 pm

Hi all,
having the following array

aArray:={}
aadd(aArray,{"Mark"," "})
aadd(aArray,{"Steve,"0"})
aadd(aArray,{"Robert",1"})

I want to permit the edit for the second column only if a numeric already value exist so in this case I can permit only to edit the Steve and Robert clause where a num value exit.

I tried to use the following code but the bEditWhen doesn't run.

oBrw425:aCols[2]:cEditPicture := "@E 999,999,999.00"
oBrw425:aCols[2]:bClrEdit := oBrw425:bClrStd
oBrw425:aCols[2]:nEditType := 1
oBrw425:aCols[2]:bEditWhen := {|o,x| valtype(o)="N"}
oBrw425:lFastEdit:=.t.

Probably my bEditWhen code is wrong. any ideas?
Thanks in advance
Best Regards,

Marco Turco
SOFTWARE XP LLP
User avatar
Marco Turco
 
Posts: 858
Joined: Fri Oct 07, 2005 12:00 pm
Location: London

Re: using xbrowse bEditWhen

Postby Demont Brecht » Tue Oct 18, 2011 2:47 pm

oBrw425:aCols[2]:bEditWhen := {|o,x| valtype(o)="N"}


The first parameter (o) is a column object , valtype(o) should always be 'O'

Frank
Demont Brecht
 
Posts: 55
Joined: Fri Jul 08, 2011 6:43 am

Re: using xbrowse bEditWhen

Postby nageswaragunupudi » Wed Oct 19, 2011 6:44 am

Please try
oBrw425:aCols[2]:bEditWhen := {|o,x| valtype(o:Value)="N"}
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10631
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: using xbrowse bEditWhen

Postby Marco Turco » Wed Oct 19, 2011 7:07 pm

That's fine. Thank you Rao
Best Regards,

Marco Turco
SOFTWARE XP LLP
User avatar
Marco Turco
 
Posts: 858
Joined: Fri Oct 07, 2005 12:00 pm
Location: London


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 98 guests