Page 1 of 1
How to make column Editable in TCBrowse ?
Posted: Tue Dec 13, 2005 1:15 pm
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
Posted: Wed Dec 14, 2005 8:11 am
by Antonio Linares
Milan,
What FWH version are you using ? This was recently fixed in 2.7 version.
Posted: Wed Dec 14, 2005 9:40 am
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.
Posted: Wed Dec 14, 2005 10:55 am
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.
Posted: Thu Dec 15, 2005 6:42 am
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.
Posted: Thu Dec 15, 2005 9:36 am
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
Posted: Thu Dec 15, 2005 11:12 am
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.
Posted: Thu Dec 15, 2005 2:13 pm
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