save changes made in Xbrowse

save changes made in Xbrowse

Postby Marc Venken » Wed Jun 14, 2017 10:34 pm

Hello,

I want to save changes made in xBrowse to a online file (MariaDB)

I"ve seen parts that uses
Code: Select all  Expand view

oBrw[1]:lColChangeNotify := .t.
oBrw[1]:bChange := { |oBrw, uOlddata| Changedata( oBrw, uOlddata ) }
or
oBrw[1]:bChange := { |obrw| OnColChange( oBrw ) }

function OnColChange( oBrw )

   // take action here
   ? oBrw:nColSel // --> new column number
   ? oBrw:SelectedCol() //--> new column object
   ? oBrw:SelectedCol():Value //--> value of the new column

   // using the above data you take your action

return nil
 


But maybe there is also a new method in Xbrowse that handle this better ?
If any change in a cell are done, then I want to save (Fieldname, oldvalue, newvalue)

So I also need the Older data of the cell, and the new data.

Any samples that uses this technique ?
Marc Venken
Using: FWH 23.04 with Harbour
User avatar
Marc Venken
 
Posts: 1431
Joined: Tue Jun 14, 2016 7:51 am
Location: Belgium

Re: save changes made in Xbrowse

Postby nageswaragunupudi » Thu Jun 15, 2017 2:48 am

oCol:bOnChange := { |oCol, uOldVal| OnColChange( oCol, uOldVal ) }

function OnColChange( oCol, uOldVal )

// Save
// oCol:cExpr, oCol:Value, uOldVal

return nil
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 113 guests