javascriptcheckboxdom-eventswebix

Edit true/false depending on the checkbox value in Webix


I've created an editable Webix datatable with the column of checkboxes.

Wondering how can I set edit function to the datatable row depending on the value of the checkbox? Perhaps, I should use

$$("dataTable").attachEvent("onBeforeEditStart", function(. . .){. . .});

But I'm a bit confused what exactly I need to write. And here goes the snippet.


Solution

  • It works via simple logic:

    function(id){
      if(this.getItem(id).ch1){
          return true;
      }
      return false;
    }
    

    Check this: http://webix.com/snippet/098c09dd