CheckBox

How to make it work (checkbox) ?

{ 
id:"value",    
css:{"text-align":"left"}, 
header:"VALUE", 
width:470, 
editor:"text", 
    template:function(obj, common) {
        if (obj.type == '1') {
            if (obj.value == 'true') {
                return "<div class='webix_table_checkbox checked'> YES </div>";
            }  else {
                return "<div class='webix_table_checkbox notchecked'> NO </div>";
            }
        } else {
            return obj.value 
        }
    }
}
<div class='webix_table_checkbox notchecked'> NO </div>
<div class='webix_table_checkbox notchecked'> YES </div>

tag ‘div’ does not print…

Is it possible to combine the two types of editors in the DataTable ?
Text and combobox ?

Yep, you can combine them: http://webix.com/snippet/96c41b1b

Please, pay attention to the following configuration settings:

  • checkboxRefresh property of the Datatable that refreshes its data when checkbox value changes
  • the onBeforeEditStart event that prevents from opening the text editor when it’s not needed.

P.S. To embed code into forum posts, please enclose it into the following lines (without spacings)

~~~ html ~~~ for HTML code
etc.

Thanks

How to track events for custom checkbox ?

Here can I use a simple chechkbox to track events ?

You need to handle the onCheck event: http://webix.com/snippet/a4bd8941

Thanks