View Full Version : Tree Panel checkbox icon problem

23 Oct 2012, 1:01 PM
I need help. I have Tree Panel and Grid Panel. In tree panel are categories from database. After onclick event in tree panel is automatically loaded store from ajax request to grid panel. In grid is column with checkboxes. And here is my problem. After check/uncheck record in grid I want set checkbox icon in treepanel (id field from tree store is the same what parent field in grid store) and icons for this node parents. I haven't idea how i can do it.

Any help? It's very important for me...

23 Oct 2012, 4:21 PM
1. On check/uncheck item in grid, get recordId of checked/unchecked record.
2. Get respective node in tree panel by using <treeStore>.getNodeById().
3. If node found, then call node.set('checked', true/false).

24 Oct 2012, 2:19 AM
great! it's working. :D

My last problem is How can I set a css propeties this node? I want set checkbox background image in tree panel (default is checkbox.gif)

24 Oct 2012, 3:39 PM
Try to use <node>.set('cls', 'nodeClass').