enable/disable DragColumn Datatable with checkbox

Hi, I would enable and disable the property “dragcolumn” of the datatable through a checkbox.
this is the code.

{
        view: "checkbox", labelRight: "Move", value:0, css: "checkboxmenu", on:{
            "onChange":function(){
            if(this.config.value == 0){
                //webix.message(this.getValue())
                $$("processesDatatable").define("dragColumn",false);
                //$$("processesDatatable").refresh();
                //webix.message(this.getValue())
            }else{
                //webix.message(this.getValue())
                $$("processesDatatable").define("dragColumn",true);
               
                //webix.message(this.getValue())
            } $$("processesDatatable").refresh();
        }
     }
}

The property doesn’t become "false"again.

Thanks in advance.

Hello,

When we are talking about disable/enable drugging columns, so it’s better to use onBeforeColumnDrag event handler. And there you can check the value of a checkbox. Depending on the value - return false or true.