Data Update from 2 forms and 1 datastore

Hi !

The situation is:

I have one datastore, one grid and several forms (form_1, form_2) bind to the grid that showme the details (every form is in a tab).
I have one Save button.

When I clic the Save button I have the code:
form1.save();
form2.save();

The problem is that when the system executes Form1.save() makes a reload of the info from the datastore in the form2.
So, at the end the data form the form2 is never saved.

How can i solve it ?

Thanks a lot!!!

Albert

Check
docs.dhtmlx.com/doku.php?id=dhtm … _savebatch

You can use

data.saveBatch(function(){ myForm1.save(); myForm2.save(); });

Thanks a lot for the answer!!

i didn’t know the instruction saveBacth().

I change the code:

form_1.save();
form_2.save();

for the code you send me:

mydata.saveBatch(function(){
form_1.save();
form_2.save();
});

But the result is the same.
It only saves the first form, then clear the second. Maybe i have to add more code ??

Thanks a lot!

Please attach full js code of form and datastore initialization and saving, the above code must be enough for saving multiple forms