tags:

views:

46

answers:

0

I created one dojo tree as follows :

store = new dojo.data.ItemFileWriteStore({url: link});
treeModel = new dijit.tree.TreeStoreModel({
                                        store: store,
                                        query: {
                                                "type": "ROOT"
                                                },
                                        rootId: "newRoot",
                                        childrenAttrs: ["children"]
                                    });

new dijit.Tree({model: treeModel},"treeOne");

Here this url points to one json file. I am adding node to this tree dynamically as follows :

store.fetchItemByIdentity({
                       identity: pid,
                       onItem : function(item, request) {
                       parentitem = item;
                       treeModel.newItem({id: cid,name: cname,type: ctype},parentitem)
                       },
                      onError : function(item, request) {
                      }
                   });
                 }

While adding these new entry as a tree node to this tree,i want to change the color of some tree nodes to red or some other color,just to differentiate from other nodes just for users attention. Is there any way this can be done in the dijit tree? Changing the background color is not the only option,i just want to display that node a bit differently so that user can notice that node. Any help??