question about xBrowse

question about xBrowse

Postby ukservice » Sat Dec 24, 2011 12:37 pm

Hello,

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

Code: Select all  Expand view
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:nColSel]:bOnPostEdit := {|x|x:Value := x:oEditGet:Value,oBrw:nColSel--}
does NOT save changes.

But if I define xBrowse as
Code: Select all  Expand view
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
User avatar
ukservice
 
Posts: 417
Joined: Tue Feb 23, 2010 3:09 pm
Location: John

Re: question about xBrowse

Postby nageswaragunupudi » Tue Dec 27, 2011 1:51 am

This is the recommended way
Code: Select all  Expand view
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
User avatar
nageswaragunupudi
 
Posts: 10632
Joined: Sun Nov 19, 2006 5:22 am
Location: India


Return to FiveWin for Harbour/xHarbour

Who is online

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