PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → [WB20] Detect user datachanges in controls ?
[WB20] Detect user datachanges in controls ?
Iniciado por guest, 16,nov. 2015 11:45 - 2 respuestas
Publicado el 16,noviembre 2015 - 11:45
Hi,

What would be the best method of detecting that the user has changed the content of a control on a page. Let it be 1 or more controls.

This would be to detect that the user has changed something in order to ask if he wants to save the data when he navigates away or selects another record to be loaded when the previous one is not saved yet.

I was wondering if I could do this without having to call a "DataHasChanged" function in every control's OnChange event ?

Thanks
Danny
Publicado el 16,noviembre 2015 - 12:18
Hi Danny

the easy way to do that is to use the ..modified property of the page or of the list of controls (with enumxxx and indirections)

However, if a control was changed from John to Johns THEN BACK to John, ..modified will STILL be true

So the ONLY way to do that perfectly is to store the original values, and compare with enumxxx and indirections

Best regards
Publicado el 16,noviembre 2015 - 13:54
Fabrice,

Thanks for the anwser, but I cannot seem to find the ..Modified parameter. I checked the help and these functions do not seem to be available for Webdev.

So I'll have to find another way.

Thanks
Danny