masterCheckbox in a datatable

妖精的绣舞 提交于 2019-12-24 02:05:46

问题


I'm trying to add a masterCheckbox to the webix datatable items. For now, I got the following behavior: when I click on the master checkbox, the values rewrite to 1 or 0

{ 
    id:"title", 
    checkValue:"on", 
    uncheckValue:"off", 
    template:"{common.checkbox()} #title#", 
    header:["Title", {content:"masterCheckbox", contentId:"checkAll"}],
    fillspace:true
}

http://webix.com/snippet/26750201

Aby idea what I'm doing wrong?


回答1:


The only example with the masterCheckbox I found is this sample.

Seems like the masterCheckbox changes the value in the current column. I.e. in your sample title becomes on or off. I suppose the provided use-case is to have a separate column with {common.checkbox()}:

columns:[
  { id:"ch1", header:{ content:"masterCheckbox", contentId:"mc1" }, template:"{common.checkbox()}", width:40}      
],    

Sample: http://webix.com/snippet/17a28a40



来源:https://stackoverflow.com/questions/38878786/mastercheckbox-in-a-datatable

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!