简体   繁体   English

禁用\\在Kendo UI TreeList中启用多个复选框

[英]Disable\Enable multiple checkboxes in Kendo UI TreeList

I tried these solutions for disable\\enable multiple checkboxes in Kendo UI TreeList when header checkbox is clicked: 当单击标题复选框时,我尝试使用这些解决方案在Kendo UI TreeList中禁用\\ enable多个复选框:

1.prop('disabled',true) \\ prop('disabled',false) 1.prop('disabled',true)\\ prop('disabled',false)

2.attr('disabled','disabled') \\ removeAttr('disabled'); 2.attr('禁用','禁用')\\ removeAttr('禁用');

3.$(...)[0].disabled=true \\ $(...)[0].disabled=false 3。$(...)[0] .disabled = true \\ $(...)[0] .disabled = false

But all of them has the same problem which affects just the last item in the TreeList !!! 但是它们都有同样的问题,只会影响TreeList中的最后一项!

I really confused and don't know what is going wrong, is it possible to be resolved? 我真的很困惑,不知道出了什么问题,是否有可能得到解决?

Use jQuery.each() to iterate over all your checkboxes. 使用jQuery.each()迭代所有复选框。

For the checking itself, prop is the way to go. 对于检查本身,道具是要走的路。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM