How to know when myDataProcessor.sendData() has finished upd

Hello there,

I have a page with a datagrid and when user clicks the save button, I want to navigate to another page.

It seems that if I add a lot of rows and click save, the datagrid only manages to update a few rows before the page navigates to some other page.

I have tried this:

function saveDataGrid()



return true;


return false;


But it seems like the script doesn’t wait for sendData() to complete…

dataProcessor sends data by async. calls, it useful when you saving data in background, but may cause problem in situation similar to yours.
Please try to use code similar to next

          if (myDataProcessor.getSyncState()){
                   //any code which need be called when all data saved