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.

Comments

  • 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.

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!

In this Discussion