Page 1 of 1

TWBROWSE In Line Editing Of Database

PostPosted: Fri Feb 17, 2006 8:02 am
by dpaterso
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.

Re: TWBROWSE In Line Editing Of Database

PostPosted: Fri Feb 17, 2006 9:21 am
by Enrico Maria Giordano
Have a look at how TWBrowse:lEditCol() is implemented and use it to write your own cell editing function.

EMG

PostPosted: Fri Feb 17, 2006 9:42 am
by dpaterso
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.

PostPosted: Fri Feb 17, 2006 9:56 am
by Antonio Linares
Dale,

You may review samples\TestBrw.prg