EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: devnull on March 21, 2012, 05:02:02 AM



Title: tree not firing on uncheck
Post by: devnull on March 21, 2012, 05:02:02 AM
Hi, not sure if I am doing anything wrong, but during tree load the onCheck event is fired which is great as it shows the columns, however it does not hide those columns where the tree node is unchecked.

I am using the tree to dynamically show / hide columns in a datagrid.

Code:
onCheck:function(node){
  if(node.checked) {
    $('#data').datagrid('showColumn',node.id);
    console.log(node.id+' show');
}
else {
  console.log(node.id+' hide');
  $('#data').datagrid('hideColumn',node.id);
}