xBrowse - edit

Post Reply
StefanHaupt
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany

xBrowse - edit

Post by StefanHaupt »

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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

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
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Post by nageswaragunupudi »

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

G. N. Rao.
Hyderabad, India
StefanHaupt
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany

Post by StefanHaupt »

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
ShumingWang
Posts: 454
Joined: Sun Oct 30, 2005 6:37 am
Location: Guangzhou(Canton),China

Post by ShumingWang »

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
Post Reply