How to make column Editable in TCBrowse ?

Post Reply
Milan Mehta
Posts: 115
Joined: Mon Oct 17, 2005 4:42 am
Location: India

How to make column Editable in TCBrowse ?

Post by Milan Mehta »

Hello All,

How can I make a column editable in TcBrowse ? I did use EDITABLE clause in ADD COLUMN TO. It does does accept the new value when double clicked, but on pressing Enter original value appears back. What am I doing wrong ?

TIA
Milan
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Milan,

What FWH version are you using ? This was recently fixed in 2.7 version.
regards, saludos

Antonio Linares
www.fivetechsoft.com
Milan Mehta
Posts: 115
Joined: Mon Oct 17, 2005 4:42 am
Location: India

Post by Milan Mehta »

Antonio Linares wrote:Milan,

What FWH version are you using ? This was recently fixed in 2.7 version.
Hello Antonio,

The latest 2.7 only. Still it does not work.

TIA
Milan.
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Milan,

Our mistake, sorry. Its going to be published in a few days.

We email you the Class TCBrowse so you can test it. Thanks.
regards, saludos

Antonio Linares
www.fivetechsoft.com
Milan Mehta
Posts: 115
Joined: Mon Oct 17, 2005 4:42 am
Location: India

Post by Milan Mehta »

Antonio Linares wrote:Milan,

Our mistake, sorry. Its going to be published in a few days.

We email you the Class TCBrowse so you can test it. Thanks.
Hello Antonio,

Still it did not help. Following is my code snippet. Am I doing anything wrong ? Testtcb2.Prg in Samples works fine but in that example too changes are not saved to underlying dbf file.

REDEFINE BROWSE oBrw ;
ALIAS "Order" ;
ID LBORDER OF oDlg ;
ON LEFT DBLCLICK EditCell( oBrw, nRow, nCol );
COLOR CLR_BLUE, RGB( 255, 255, 235 ) ;
FONT oFont ;
UPDATE

ADD COLUMN TO BROWSE oBrw ;
DATA Order->AgentCode;
HEAD "ftuz" ;
WIDTH 50 ;
EDITABLE

TIA

Milan.
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Milan,

Please try this code:

Code: Select all

ADD COLUMN TO BROWSE oBrw ; 
DATA { | u | If( PCount() > 0, Order->AgentCode := u, Order->AgentCode ) }; 
HEAD "ftuz" ; 
WIDTH 50 ; 
EDITABLE
regards, saludos

Antonio Linares
www.fivetechsoft.com
Milan Mehta
Posts: 115
Joined: Mon Oct 17, 2005 4:42 am
Location: India

Post by Milan Mehta »

Antonio Linares wrote:Milan,

Please try this code:

Code: Select all

ADD COLUMN TO BROWSE oBrw ; 
DATA { | u | If( PCount() > 0, Order->AgentCode := u, Order->AgentCode ) }; 
HEAD "ftuz" ; 
WIDTH 50 ; 
EDITABLE
Hello Antonio,

I am getting following error while trying to edit the cell :
Unrecoverable Error 9000
Couldn't create error object in hb_errNew()

Thanks,

Milan.
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Milan,

Please generate the PPO file and post here the result for that line. Thanks.

You may also try this:

Code: Select all

ADD COLUMN TO BROWSE oBrw ; 
DATA bSETGET( Order->AgentCode ) ; 
HEAD "ftuz" ; 
WIDTH 50 ; 
EDITABLE
regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply