FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Method ONEDIT does NOT exists for TXBRowse Column class
Posts: 336
Joined: Mon Dec 07, 2009 02:49 PM
Method ONEDIT does NOT exists for TXBRowse Column class
Posted: Mon Oct 15, 2012 03:33 AM

Hi ,

I defined XBROWSE for mySQL TDolphin Recordset and trying edit the data from the XBROWSE. When user edits any column value it gives an error like "Method does exists ONEDIT". Also I checked in the source code of XBrowse.prg I could not found the ::ONEDIT Method but, it is called in the code. If method is not exists then how code is compiled ? Please correct me if am wrong. So how can edit the values of mySQL TDolphin Recordset via XBROWSE ?

Thanks
Shridhar

Thanks

Shridhar

FWH 24.04, BCC 7 32 bit, MariaDB
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Re: Method ONEDIT does NOT exists for TXBRowse Column class
Posted: Mon Oct 15, 2012 12:48 PM
Shridhar

You should be able to edit any cell with the FASTEDIT clause :

Code (fw): Select all Collapse
 AUTOCOLS LINES CELL FASTEDIT


and in addition to FASTEDIT you can explicitly assign EDIT_GET to every column :

Code (fw): Select all Collapse
 AEval( oLbxB:aCols, { |o| o:nEditType := EDIT_GET } )


Likewise you can assign EDIT_NONE to any specific column which over-rides any global EDIT_GET :

Code (fw): Select all Collapse
oLbxB:aCols[1]:nEditType := EDIT_NONE


There is a "pre" and a "post" edit code block you can utilize on a column as well :

Code (fw): Select all Collapse
oLbxB:aCols[3]:bOnPreEdit := { || If(oRsInvDetail:Fields("Inventory Id"):Value = " ", , __Keyboard( Chr( VK_HOME ))) }

oLbxB:aCols[3]:bOnPostEdit := {|o,v| _InvtLook( v, oRsInvDetail) }


Rick Lipkin
Posts: 336
Joined: Mon Dec 07, 2009 02:49 PM
Re: Method ONEDIT does NOT exists for TXBRowse Column class
Posted: Tue Oct 16, 2012 07:52 AM

Hi Rick ,

Thanks a lot...! but I had done first two steps for edit, as I mentioned I got an error "ONEDIT method does not exists". However I will check as per your code and let you know. And may I know _InvtLook function does ?

Thanks
Shridhar

Thanks

Shridhar

FWH 24.04, BCC 7 32 bit, MariaDB
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Re: Method ONEDIT does NOT exists for TXBRowse Column class
Posted: Tue Oct 16, 2012 12:42 PM

Shridhar

You can create any user defined function to be called with the code block .. _InvtLook in this case was a inventory search routine for a stock number that was entered into the browse .. It demonstrates the versatility of the pre and post routine when you edit a cell.

Rick Lipkin

Posts: 336
Joined: Mon Dec 07, 2009 02:49 PM
Re: Method ONEDIT does NOT exists for TXBRowse Column class
Posted: Thu Oct 18, 2012 03:20 PM

Hi Rick ,

I have done the changes as you suggested, now its working :-)

Thanks
Shridhar

Thanks

Shridhar

FWH 24.04, BCC 7 32 bit, MariaDB

Continue the discussion