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
How to make column Editable in TCBrowse ?
-
- Posts: 115
- Joined: Mon Oct 17, 2005 4:42 am
- Location: India
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
-
- Posts: 115
- Joined: Mon Oct 17, 2005 4:42 am
- Location: India
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
-
- Posts: 115
- Joined: Mon Oct 17, 2005 4:42 am
- Location: India
Hello Antonio,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.
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.
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Milan,
Please try this code:
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
-
- Posts: 115
- Joined: Mon Oct 17, 2005 4:42 am
- Location: India
Hello Antonio,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
I am getting following error while trying to edit the cell :
Unrecoverable Error 9000
Couldn't create error object in hb_errNew()
Thanks,
Milan.
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Milan,
Please generate the PPO file and post here the result for that line. Thanks.
You may also try this:
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