Articles in this section
Category / Section

Enable checkbox for single selection mode in TreeView component

1 min read

The single selection on TreeView nodes along with the checkbox can be achieved by unchecking the previously checked nodes using uncheckAll methods during the nodeChecking event.

Refer to the following code snippet. 

 
var treeObj = new ej.navigations.TreeView({
  nodeChecking: function(args) {
    if (args.action === 'check' && args.isInteracted) {
      treeObj.uncheckAll(treeObj.checkedNodes);
    }
  }});
treeObj.appendTo('#tree');


Refer to the sample link: Sample

 

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please  to leave a comment
Access denied
Access denied