FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour xBrowse - edit
Posts: 824
Joined: Thu Oct 13, 2005 07:39 AM
xBrowse - edit
Posted: 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
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
xBrowse - edit
Posted: 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
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
xBrowse - edit
Posted: Fri Jan 11, 2008 12:12 PM

How can oBrw:aCols[2] be Zero ?

Regards



G. N. Rao.

Hyderabad, India
Posts: 824
Joined: Thu Oct 13, 2005 07:39 AM
xBrowse - edit
Posted: Fri Jan 11, 2008 07: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
Posts: 474
Joined: Sun Oct 30, 2005 06:37 AM
xBrowse - edit
Posted: 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

http://www.xtech2.top
Mobile:(86)13802729058
Email:100200651@qq.com
QQ:100200651
Weixin: qq100200651

Continue the discussion