smartgwt - dynamically select a checkbox for siblings treenode in Smart GWT -


i have selectable tree checkbox appearance. need select sibling treenode on selection of specific treenode.

i sibling tree nodes, don't know attribute name of treenode make checkbox selected.

can me giving way select nodes.


comparegrid.addselectionchangedhandler(new selectionchangedhandler() {      @override     public void onselectionchanged(selectionevent event) {         treenode node =  (treenode) event.getselectedrecord();         treenode parent = tree.getparent(node);//tree tree object          treegrid.selectrecord(parent);         treenode[] nodes = tree.getallnodes(parent);         for(int i=0; i< nodes.length; i++){             if(!nodes[i].getattributeasboolean("isselected"))                 treegrid.selectrecord(nodes[i]);             }         }     } }); 

you can use of following:

treegrid.selectallrecords(); treegrid.selectrecord(record); treegrid.selectrecords(records); 

the first method select treenodes of tree.

the 2nd 1 select 1 specified treenodes of tree.

and 3rd 1 select multiple specified treenodes of tree.

there multiple overloaded methods last 2 methods, allows specify nodes in terms of, treenode(s) itself, or index of treenode(s).


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

How to get multiresult with multicondition in Sql Server -