Replacing records of a Table Record

i am working on to replace a table record with different set of records upon selecting a radio button.
i have 2 tables (table A and Table B). On page load, i am showing the values of tableA with the help of a table Record widget. Now when i select a radio button, i need the values to be replaced in the grid from tableB. (this is just for showing purpose only). After i click on an update button, all the corresponding values from tableB should be updated to tableA.
can anyone help me in this regards to have a direction on how to achive this?

thanks and regards..
Hi leo,

Have you started working on this already. Do you have something that you can share that we can comment and try to point you in the right direction?
Hi Andre,
thanks for the reply. Right now i used to manage an alternate solution to achieve this. i am using two table record widgets for both table A and Table B. on clicking the radio button i show/hide the two tables respectively. (searching for the records with tableA.column1 in table B and showing them in table B grid).
but the problem remains the same while updating all  the corresponding record values in table A from Table B.
I know this can be achieved by iterating table records and updating one by one, But isnt there an easier way of doing this so that it will not affect the performance if i am having enourmous records in thousands or in lakhs?
I'm sorry leo,
I don't actually understand what you're trying to achieve to be able to give you any alternative...
I might understand (though I may be wrong). But first some terminology and technical stuff: a Table Records is a widget, i.e. it shows data. The data it shows is managed through its Source Record List property. When you Ajax refresh a Table Records, it rebinds to that data, i.e. if the list or query that you specified in the Source Record List property has changed, it will reflect these changes.

Now on to your problem. I am assuming that your "tableA" and "tableB" are not Table Records widgets, but record lists, and that you want only one Table Records on the screen, and depending on the radio button you want the content of record list tableA or the content of record list tableB to be shown. I'm also assuming that these record lists containt the same Entities or Structures (if this is not the case, using two different Table Records is a must). Now, you can't change the Source Record List property run time, but what you can do is create a local variable that you assign either tableA or tableB to, and specify that variable as Source Record List. In the OnChange action of the radio button, you can change the assign, then Ajax Refresh the Table Records.

I have included a small eSpace to show you what I just explained.

Thanks Kilian... You got it...!!
unfortunately i am using version8.0.25 and your example is in version 9. so not able to open it.
but anyways thanks for your suggestion on the method. I will try it for sure :)
Hi Leo,

Glad I could help. You can always install version 9 alongside 8, or try it in a personal environment in the cloud (which is on 9). Let us know if you get it working.
Thanks for this usefull example Killian!

Best Regards
You are most welcome. Don't forget to thumbs-up my post above :).