Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Is there a way to programmatically open and close nodes in a treeGrid tree that has a

    I have a TreeGrid with a RPC datasource. It loads fine. I can click on a node and the TreeGrid calls the datasource and loads then displays the nodes.

    I want to programmatically tell the tree grid to open one of the nodes. I know the id of the node. To call open I have done this on a client only TreeGrid with no datasource and it works as expected:
    Code:
     
    Tree theTree = treeGrid.getData();
    String id = "4";
    TreeNode findNode = theTree.findById(id);
    if ( findNode != null ) {
      theTree.openFolder(findNode);             
       GWT.log("Found Node by id: " + id + " Name is: " 
                   + findNode.getAttribute("Name") );                              
    }

    But when I have a datasource by doing:
    treeGrid.setDatasource(dataSource);
    treeGrid.setData(tree);

    Calling getData or getTree does not produce a tree that I can
    call find on.

    Is there a way to programmatically open and close nodes in a treeGrid tree that has a datasource?

    thanks.

    #2
    did you ever get a solution to this problem?

    Comment

    Working...
    X