How to make column Editable in TCBrowse ?

How to make column Editable in TCBrowse ?

Postby Milan Mehta » Tue Dec 13, 2005 1: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
Milan Mehta
 
Posts: 115
Joined: Mon Oct 17, 2005 4:42 am
Location: India

Postby Antonio Linares » Wed Dec 14, 2005 8:11 am

Milan,

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

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41411
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Milan Mehta » Wed Dec 14, 2005 9: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.
Milan Mehta
 
Posts: 115
Joined: Mon Oct 17, 2005 4:42 am
Location: India

Postby Antonio Linares » 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
User avatar
Antonio Linares
Site Admin
 
Posts: 41411
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Milan Mehta » Thu Dec 15, 2005 6: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.
Milan Mehta
 
Posts: 115
Joined: Mon Oct 17, 2005 4:42 am
Location: India

Postby Antonio Linares » Thu Dec 15, 2005 9:36 am

Milan,

Please try this code:
Code: Select all  Expand view
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
User avatar
Antonio Linares
Site Admin
 
Posts: 41411
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Milan Mehta » Thu Dec 15, 2005 11:12 am

Antonio Linares wrote:Milan,

Please try this code:
Code: Select all  Expand view
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.
Milan Mehta
 
Posts: 115
Joined: Mon Oct 17, 2005 4:42 am
Location: India

Postby Antonio Linares » Thu Dec 15, 2005 2:13 pm

Milan,

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

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

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41411
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 37 guests