FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour question about xBrowse
Posts: 417
Joined: Tue Feb 23, 2010 03:09 PM
question about xBrowse
Posted: Sat Dec 24, 2011 12:37 PM
Hello,

I have a dbf with 10 fields but I only indicate 2 in xbrowse.

Code (fw): Select all Collapse
 REDEFINE XBROWSE oBrw ID 210 OF oDlg ;
          ALIAS "invoices" ;
          FIELDS invoices->field3, invoices->field6 ;
          HEADERS "field 3", "field 6"


In that case, oBrw:aCols[oBrw]:bOnPostEdit := {|x|x:Value := x:Value,oBrw:nColSel--}
does NOT save changes.

But if I define xBrowse as
Code (fw): Select all Collapse
REDEFINE XBROWSE oBrw OF oDlg ID 210   AUTOCOLS ALIAS "LINEASTMP" CELL LINES
it works, but I don´t need all fields.

Thanks.
FWH 11.11, Harbour 3.1 and Borland C++ 5.82
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: question about xBrowse
Posted: Tue Dec 27, 2011 01:51 AM
This is the recommended way
Code (fw): Select all Collapse
REDEFINE XBROWSE oBrw ID 210 OF oDlg ;
          ALIAS "invoices" ;
          COLUMNS "field3", "field6" ;
          HEADERS "field 3", "field 6"  // You can ommit headers if same name

Please avoid using FIELDS command. This is provided for easy and quick migration from wbrowse.
Regards



G. N. Rao.

Hyderabad, India

Continue the discussion