TWBROWSE In Line Editing Of Database

TWBROWSE In Line Editing Of Database

Postby dpaterso » Fri Feb 17, 2006 8:02 am

Hello,

Does anyone have a working sample (small and simple if at all possible) that allows a user to edit the individual cells in a LISTBOX BROWSE (TWBROWSE), validate the data entered, and then save the changed data to a database?

Alternatively is it possible to do the above using an array and then saving the entire edited line to a database after validation?

I have started experimenting with oLbx: lAutoEdit := .T. and although I can change the data in a cell I don't quite understand how to validate the data once entered and if the data is correctly validated then save it to the currently open database.

There is an associated 'oGet' in the documentation but I don't seem to be able to tie this in with the 'Get' of the cell or browse.

I have looked and TESTBRW.PRG but their is an associated .DLL file that I cannot open to have a look at and TESTBRW.PRG only allows you to edit the cell data and does not have an associated database file to which the changes are saved.

Does the quick BROWSE() function allow for any validation of changes made and if so how do you trap for them?

Regards,

Dale.
dpaterso
 
Posts: 142
Joined: Tue Jan 24, 2006 9:45 am
Location: South Africa

Re: TWBROWSE In Line Editing Of Database

Postby Enrico Maria Giordano » Fri Feb 17, 2006 9:21 am

Have a look at how TWBrowse:lEditCol() is implemented and use it to write your own cell editing function.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby dpaterso » Fri Feb 17, 2006 9:42 am

Thank you!

I was trying to find samples containing nAtCol and was not looking for lEditCol. Found many with lEditCol!

Thanks again.

By the way - is this an 'acceptable' and 'robust' form of data input in FWH?

We have many other commerically available packages here that use this type of 'table' or 'spreadsheet' input but I seem to remember that some time ago when I asked if this was possible in FWH someone (I forget who) said that FWH (or at that stage I was using FW) did not provide for this type of input. Is this something new is the later versions of FWH?

Being able to accomplish this sure beats opening a dialog box, input data, save data, update database, close dialog box, refresh listbox, and then open dialog box again to input next record (if it is 'robust' of course)!!!

Regards,

Dale.

By the way - welcome back Mr Bott - I received your message - will test and let you know.
dpaterso
 
Posts: 142
Joined: Tue Jan 24, 2006 9:45 am
Location: South Africa

Postby Antonio Linares » Fri Feb 17, 2006 9:56 am

Dale,

You may review samples\TestBrw.prg
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42076
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 76 guests