DHTMLX Docs & Samples Explorer

saveBatch (func)

Makes simultaneous saving several components (batch saving).

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

where myForm1, myForm2 - forms bound to DataStore.

Parameters:

  • func - the user-defined handler function.

Description:

  • The code snippet above shows the most popular use case - saving changes made in 2 bound forms.
    Sequential saving provokes data loss: when we save data in one form, the second form is updated by old data. The method helps to prevent losses and save data simultaneously.