EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: ertguler on June 21, 2018, 03:39:27 PM



Title: Cascade CheckBox TreeGrid Set Indeterminate
Post by: ertguler on June 21, 2018, 03:39:27 PM
I am using a dynamic load cascade checkBox  treegrid. Some of the nodes that have not yet been loaded have unchecked child items. But because I'm using dynamic loading, the TreeGrid does not know about this, so it can not indeterminate this node. The problem is: can we set a node to indeterminate in TreeGrid?


Title: Re: Cascade CheckBox TreeGrid Set Indeterminate
Post by: jarry on June 21, 2018, 05:56:49 PM
Please try this code:
Code:
var tg = $('#tg');
var treeField = tg.treegrid('options').treeField;
var id = 1;
var tr = tg.treegrid('options').finder.getTr(tg[0],id);
var ck = tr.find('td[field="'+treeField+'"] .tree-checkbox');
ck.addClass('tree-checkbox2')