xBrowse - edit

xBrowse - edit

Postby StefanHaupt » Fri Jan 11, 2008 11:20 am

Hi all,

how can I change the possibiltiy to edit a value on the fly depending on special condition ? If the condition is .t., user can edit, if it is .f. editing is not allowed. So the permission to edit changes from row to row.

oBrw:aCols[3]:nEditType := IIF (oBrw:aCols[2]= 0, EDIT_NONE, EDIT_GET)
is not working.
kind regards
Stefan
StefanHaupt
 
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany

Postby Antonio Linares » Fri Jan 11, 2008 11:49 am

Stefan,

Try to use oBrowse:bChange to do it:

oBrw:bChange := { || oBrw:aCols[3]:nEditType := IIF (oBrw:aCols[2]= 0, EDIT_NONE, EDIT_GET) }
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby nageswaragunupudi » Fri Jan 11, 2008 12:12 pm

How can oBrw:aCols[2] be Zero ?
Regards

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

Postby StefanHaupt » Fri Jan 11, 2008 7:46 pm

Antonio,

that´s it, it´s working perfectly :D
Thanks.


NageswaraRao,

I´m browsing an array and the value on the second position (that is the second column) is zero.
But you are right, exactly I should write Eval(oBrw:aCols[2]:bStrData)
kind regards
Stefan
StefanHaupt
 
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany

Postby ShumingWang » Sat Jan 12, 2008 12:37 am

Nedittype change into block, that is very good.
obrow:acols[2]:nedittype:={||mycondition}
Some other codes change ocol:nedittype into if(valtype(ocol:nedittype)=="B",eval(ocol:nedittype),ocol:nedittype)

Regards!

Shuming Wang
ShumingWang
 
Posts: 465
Joined: Sun Oct 30, 2005 6:37 am
Location: Guangzhou(Canton),China


Return to FiveWin for Harbour/xHarbour

Who is online

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