Method ONEDIT does NOT exists for TXBRowse Column class

Method ONEDIT does NOT exists for TXBRowse Column class

Postby shri_fwh » Mon Oct 15, 2012 3: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 19.12, BCC 7 32 bit, MariaDB
shri_fwh
 
Posts: 301
Joined: Mon Dec 07, 2009 2:49 pm

Re: Method ONEDIT does NOT exists for TXBRowse Column class

Postby Rick Lipkin » Mon Oct 15, 2012 12:48 pm

Shridhar

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

Code: Select all  Expand view

 AUTOCOLS LINES CELL FASTEDIT
 


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

Code: Select all  Expand view

 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: Select all  Expand view

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: Select all  Expand view

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
User avatar
Rick Lipkin
 
Posts: 2634
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: Method ONEDIT does NOT exists for TXBRowse Column class

Postby shri_fwh » Tue Oct 16, 2012 7: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 19.12, BCC 7 32 bit, MariaDB
shri_fwh
 
Posts: 301
Joined: Mon Dec 07, 2009 2:49 pm

Re: Method ONEDIT does NOT exists for TXBRowse Column class

Postby Rick Lipkin » 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
User avatar
Rick Lipkin
 
Posts: 2634
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: Method ONEDIT does NOT exists for TXBRowse Column class

Postby shri_fwh » Thu Oct 18, 2012 3:20 pm

Hi Rick ,

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

Thanks
Shridhar
Thanks
Shridhar
FWH 19.12, BCC 7 32 bit, MariaDB
shri_fwh
 
Posts: 301
Joined: Mon Dec 07, 2009 2:49 pm


Return to FiveWin for Harbour/xHarbour

Who is online

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