FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour How to make column Editable in TCBrowse ?
Posts: 115
Joined: Mon Oct 17, 2005 04:42 AM
How to make column Editable in TCBrowse ?
Posted: Tue Dec 13, 2005 01:15 PM

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

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
How to make column Editable in TCBrowse ?
Posted: Wed Dec 14, 2005 08:11 AM

Milan,

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

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 115
Joined: Mon Oct 17, 2005 04:42 AM
How to make column Editable in TCBrowse ?
Posted: Wed Dec 14, 2005 09:40 AM
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.
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
How to make column Editable in TCBrowse ?
Posted: Wed Dec 14, 2005 10:55 AM

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
Posts: 115
Joined: Mon Oct 17, 2005 04:42 AM
How to make column Editable in TCBrowse ?
Posted: Thu Dec 15, 2005 06:42 AM
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.
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
How to make column Editable in TCBrowse ?
Posted: Thu Dec 15, 2005 09:36 AM
Milan,

Please try this code:
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
Posts: 115
Joined: Mon Oct 17, 2005 04:42 AM
How to make column Editable in TCBrowse ?
Posted: Thu Dec 15, 2005 11:12 AM
Antonio Linares wrote:Milan,

Please try this code:
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.
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
How to make column Editable in TCBrowse ?
Posted: Thu Dec 15, 2005 02:13 PM
Milan,

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

You may also try this:
ADD COLUMN TO BROWSE oBrw ; 
DATA bSETGET( Order->AgentCode ) ; 
HEAD "ftuz" ; 
WIDTH 50 ; 
EDITABLE
regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion