30 Sep 2010 5:28 AM #1
changing the checked status of a TreeNode using code
I could not find anything about this on the forum os anywhere else.
I have a tree with checkboxes set using the 'checked' property of each node.
I use the id of the TreeNode to create checkboxes with the same id in order to display a list of all selected items in the tree. When a user toggles the TreeNode, my code adds or removes a corresponding checkbox.
I have a function, see code below, attached to the checkboxes, that fires on the status change of a checkbox.
The functions get the appropriate parameters and I can access the TreeNode attributes in the function and they get applied instantly. I cannot find a method to access the the 'checked' property.
Or is changing the checked status not possible using code ?
** Solved it ** See changes to code in comments.
function reportSelectionRemoved(checkboxId, status)
treeNodeId = checkboxId.id;
root = Ext.getCmp('customerFilterTree').root;
treeNode = root.findChild('id', treeNodeId, true);
/* change the appearance */
/* change the property */
treeNode.attributes.checked = false;
if(status === false)
Last edited by MacUnix; 30 Sep 2010 at 11:55 PM. Reason: Solved
By santhosh_chennai in forum Ext GWT: DiscussionReplies: 3Last Post: 21 Jan 2011, 3:15 AM
By gianli in forum Ext: Q&AReplies: 2Last Post: 15 Apr 2010, 6:09 PM
By extjsrrr in forum Ext 2.x: Help & DiscussionReplies: 0Last Post: 21 Oct 2008, 3:11 AM