Extjs changes the check state of the tree node click the button to remove the check box

  • 2020-03-29 23:42:44
  • OfStack

Today there is a feature in the system that requires you to click a button to remove the check box in front of the tree node and make it unselected. I searched the Internet for a long time, and then I checked the API by myself. Finally I found a solution.

This is handled differently in extjs3.x and 4.x versions. In the 3.x version, you can do this:
 
node.attributes.checked=false; 
node.getUI().toggleCheck(false); 

This cancels the check state of the node and removes the check from the page.

The method in ExtJs4 is as follows:
 
node.raw.checked=false; 
node.set("checked",false); 

This also works!

Practice is the mother of true knowledge, encounter problems are not afraid of difficult, do not retreat, will always be solved.

Bao jianfeng from honed out, plum blossom incense from the bitter cold.

If you think reading this blog makes you gain something, you might as well click the "recommend" button in the lower right corner.

If you want to find my new blog more easily, follow it or share it.

Related articles: