FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour xBrowse and Mysql
Posts: 470
Joined: Fri Feb 05, 2010 11:30 AM
xBrowse and Mysql
Posted: Tue Sep 03, 2013 12:14 PM

Mr Nages,
how to in xbrowse:

REDEFINE XBROWSE oBrw ID 100 DATASOURCE oQuery ;
HEADERS "Fecha","Motivo" ;
COLUMNS "FECHA",{|| myfunction(oQuery:CODIGO)} ; //where myfunction is a function external
JUSTIFY AL_CENTER,AL_LEFT ;
COLSIZES 60,200 ;
LINES CELL NOBORDER OF oDlg
oDlg:oClient:=oBrw

It can be done?

Regards
Roberto

Univ@c I.S.I.
Desarrolladores de Software
http://www.elcolegioencasa.ar
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: xBrowse and Mysql
Posted: Wed Sep 04, 2013 07:26 AM

Yes.

You can intermix codeblocks in the COLUMNS clause if you are using any recent version of FWH.

If you are using an older version where codeblocks are not allowed, I suggest this workaround.

First specify the COLUMNS CLAUSE with some column name for the second column also.

After that you assign codeblock to the oCol:bEditValue.

Example:
oBrw:aCols[ 2 ]:bEditValue := { || ........your codeblock }
Also assign :cEditPicture if required and assign :cHeader

Alternatively, you can use
ADD TO oBrw DATA (your func) HEADER .... etc

Regards



G. N. Rao.

Hyderabad, India
Posts: 470
Joined: Fri Feb 05, 2010 11:30 AM
Re: xBrowse and Mysql
Posted: Fri Sep 06, 2013 11:55 AM

Mr. Nages
Thank you very much!
Roberto

Univ@c I.S.I.
Desarrolladores de Software
http://www.elcolegioencasa.ar

Continue the discussion