Upon creating a tree from a store in dojo开发者_JAVA百科, it seems to pre-select the top node in my tree; does anyone know how to stop this from happening?
Try this:
this.mytree.lastFocused.setSelected(false);
There's no official way to prevent pre-selection, although if you don't want to show any selection ever, then just write a CSS rule to suppress that style:
.dijitTreeNodeSelected { background: none !important; }
or something like that.
精彩评论