[WB17]Table in Edit mode

Startbeitrag von Ericus am 12.11.2013 20:44

Hi

If you use FiletoPage is there any way to find out if the user has started editing the record? I want to prevent the user from proceeding with other tasks before Posting or Cancelling the changes made to the record.


Thanks in advance



Ericus Steyn

Antworten:

Hi
Filetopage() is just quick code for getting info into your page. I donnot really understand your question or what you try to achief ?

But I'll try

How do you fill your page. Direct acces or memory ? Direct acces changes to a table results in direct changes in the file. In memory, stuff needs to be saved.
Pagetofile() is code for getting data form the page to the file.

Then add() or modify() changes the record.

so If you want to prevent someone to enter data you could use inmemory. Then one can add but nothing is saved after you do a hadd() of Hmodify()

Hope this helps

regards

Allard

von Allard - am 13.11.2013 08:46
Hi Ericus,

Maybe you can check the ..Modified property of the controls on your window to find out if anything is changed.

Bart

von Bart VDE - am 13.11.2013 09:49
Thanks Bart/Allard

I was trying to prevent writing code for every control on the form.

In Delphi we had a table state whether it was in insert or edit mode.

That way if the user is editing data on a form and press the exit button on the form you can ask him whether he wants to save or discard the changes made.

So in Webdev 17 I want something similar. The user has all the customer details in front of him and if he started making changes to those details I don't want him to just leave the form to go someplace else without either saving or discarding his changes.

But to put code in every control is a bit much.

Regards



Ericus Steyn

von Ericus - am 13.11.2013 11:26
You can use for each loop and check Modify property of each control of interest.

There is not much code involved in this though.

von Yogi Yang - am 16.11.2013 14:20
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.