How to get multiple edited cells value from datatable after clicking of the save button

edited January 11 in Technical questions

Hi webix Team

Here iam facing issue as after editing the cells, iam getting only single cell value, how to get the multiple cells value after editing multiple cell, when clicking of save button.

plz follow below snippet
https://webix.com/snippet/b7128f95

thanks in advance

Comments

  • Hi,

    On the client side, all changes are registered one by one.

    So the first option is just to gather updates manually in some variable.

    A second solution suits most of all for sending data to the server-side.

    By default, DataProcessor (a module which handles data saving) processes each update separately. If you need to gather the data and send all updates in one request, instead of manual gathering you can use a custom proxy object which will do the trick:

    webix.proxy.all = {
      $proxy:true,
      //send all changed records to server
      saveAll:function(view, updates, dp, callback){
        webix.ajax().post(this.source, {data:updates}, callback);
      },
      //process common response on client
      result:function(state, view, dp, text, data, loader){
        data = data.json();
    
        for(var i = 0; i<data.length; i++){
            dp.processResult(data[i], data[i], {text:text, data:data, loader:loader})
        }
      }
    };
    

    https://webix.com/snippet/481b9b6f (as the real backend of this sample will not process the data, server response is emulated)

    In such case, the data will be sent as one bunch.

  • edited January 12

    Hi Listopad

    Thank's for spending a valuable time withus,

    Here our requirement is once edit the multiple cells in datatable, and after clicking the save button i want to get the webix message like (old value has changed to new value(means updated value)).

    Thank's in advance
    Deepak

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!