Editable Table loses data

Editable Table loses data

  

I need help on how to retain data/information that is displayed in an editable table. Whenever I click  on "save" button to save information to the databas, the table seems to 'refresh" itself and that loses the information. I need the information to be retained in the screen.

Please help

Kind Regards

Mvuyo

Hi Mvuyo,

Did you specify a Screen Action for the On Row Save Event property?

Kilian Hekhuis wrote:

Hi Mvuyo,

Did you specify a Screen Action for the On Row Save Event property?


Hello Kilian

I did not specify the screen action to the table itself because I did not think I need it. What I specified an  screen action to are the elements inside the table that hold values, such as local variables.


So the table is not being referenced by any Ajax Refresh widget; which is what make me not understand why the table refreshes itself.

Hi Mvuyo,

Indeed the table shouldn't refresh itself, but to just to be sure, when talking about the Save button, you are referring to the check mark when editing a row?

hi uyo,

May this pics help:




regards,

A

Kilian Hekhuis wrote:

Hi Mvuyo,

Indeed the table shouldn't refresh itself, but to just to be sure, when talking about the Save button, you are referring to the check mark when editing a row?


hi Kilian.

No not the check mark, I mean an actual button I used to confirm whether to save the information to the DB. See the screenshot please

Solution

Hi Mvuyo,

I feared as much :) In that case, the reason why the screen is refreshing is because the button has method "Submit" instead of "Ajax Submit". With the former, the page is submitted to the server, and will be refreshed. If you don't want that, use Ajax Submit.

EDIT: Note that that doesn't have anything to do with Editable Tables, but with screens in general.

Solution

hi uyo,

you do not need to create a new button to save. Just click the check button and provide save function as my pic shown above:

regards,

A

Anonymous wrote:

hi uyo,

you do not need to create a new button to save. Just click the check button and provide save function as my pic shown above:

regards,

A

Hi Anonymous. 


Kilian Hekhuis helped me establish that it is the action within the "Save" button itself. I have tried his solution and it solved my problem. Thank you very much for your help and effort as well. Much appreciated

Kilian Hekhuis wrote:

Hi Mvuyo,

I feared as much :) In that case, the reason why the screen is refreshing is because the button has method "Submit" instead of "Ajax Submit". With the former, the page is submitted to the server, and will be refreshed. If you don't want that, use Ajax Submit.

EDIT: Note that that doesn't have anything to do with Editable Tables, but with screens in general.


Kilian Hekhuis thank you very much. That solved it!

But I  have a question - I have been using Submit action in all the screens of my application and there seems to be nothing wrong. It was only in this page where it had this unique problem. Why would that be?


Hi Mvuyo,

I can't answer that without looking at the actual code of the screens. Do you also use Editable Tables in the other screens? In this screen, did you store the data in the Save action and retrieve it in the preperation, correctly setting up the data in the Editable Table? Etc.