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

thanks in advance


  • 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 = {
      //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})
 (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

  • Unfortunately, the datatable itself doesn't track such history. DataProcessor tracks changes, but in a bit different way, it tracks only the new values

    In your case, the best approach will be to use onAfterEditStop event and store its values in some temporary structure - please check the next snippet

  • edited January 23

    Hi maksim

    thank's for reply, every thing working fine, but every item click we are getting message, but our requirement we want to get message for onchange of value.

    Thank's in advance
    Deepak E

  • Just add an extra check, which will prevent saving info about unchanged data

              onAfterEditStop:function(state, editor){
                if (state.old == state.value) return true;
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!