PDA

View Full Version : Extention to change a tree node icon dynamically



murrah
19 Jan 2009, 2:29 AM
Hi,

I wanted to change a tree node icon dynamically and after much searching found this extention "buried" in another post:

http://extjs.com/forum/showthread.php?p=235995#post235995

It worked for me beautifully.

example of use:

var nodeUI = tx.data.tree.getSelectionModel().getSelectedNode().getUI();
if (task.data.completed) {
nodeUI.setIconCls('icon-complete');
} else {
nodeUI.setIconCls('icon-list');
}
Thanks to Condor for this one.

Cheers,
Murray