View Full Version : How to add a checkbox for every tree node?

16 Aug 2007, 8:08 PM
I am writing a page which suppose to has tree and every node in it has a checkbox, when user submit a form, all the checked nodes ' id will be appended to a filed and be submited.

How can I do this?

30 Aug 2007, 1:33 PM
Well, first you'll have to create every node in the tree with the "checked" property set to false. This will put an empty checkbox near it. Then, using the "checkchange" event, you could build a list of nodes that have been checked. Sorry that I can't give more details... but I've never done this. The API documentation for tree nodes is here: http://extjs.com/deploy/ext/docs/output/Ext.tree.TreeNode.html