Pagination after drop event

Hi Webix Team,

We are trying pagination on drop event. I have maintained an array of droped quantities. which I am sending to backend even I am getting an updated data in callback but am not able to reparse the data.
I want to refresh my table and want reattach data to the table. Also can I format the data and reparse?

https://snippet.webix.com/9f3oacgd

Hello,

You can load the data via webix.ajax and parse the data in the callback:

$$("abc").attachEvent("onBeforeDrop", function(context){    
  webix.ajax(url, params, function(text, data){
    data = data.json(); 
    //replace old data with new data
    $$("abc").clearAll(); 
    $$("abc").parse(data);

    //or append old data to new data
    $$("abc").parse({data:data,  pos:$$("abc").count()});
  });

  return false;
});

https://snippet.webix.com/t5elmnc8

Or, you can use the loadNext() method either with appending content or replacing it.

Also please remember to return false in the onBeforeDrop handler to avoid adding tree data to the datatable.

Hi Helga,

But in https://snippet.webix.com/t5elmnc8 snippet how can I manage ondataRequest ?

I have tried it in https://snippet.webix.com/eimvu8sq but its not working.
If I am using load/loadNext method then I am not able to format my json because it gets directly parsed to my datatable.

Check the updated snippet
https://snippet.webix.com/s33gw2ss

In your original code, you are attaching request to the window, not to the datatable.