[CLOSED] SelectNode for 2.0

  1. #1

    [CLOSED] SelectNode for 2.0

    Hi,

    what's the right way to do
    TreeGrid1.SelectNode("Root")
    in 2.0?

    Thanks,
    Last edited by Daniil; Apr 04, 2012 at 6:04 PM. Reason: [CLOSED]
  2. #2
    Hi,

    This way:
    TreePanel1.GetSelectionModel().Select("Node1");
    You will also need to set up the following for the TreePanel.
    <SelectionModel>
        <ext:TreeSelectionModel runat="server" />
    </SelectionModel>
  3. #3
    Cool, thanks a lot!
  4. #4
    I have the code below to select a child node "node1":
    TreeGrid1.GetSelectionModel().Select("node1")
    The TreeSelectionModel as following:
    <SelectionModel>
         <ext:TreeSelectionModel ID="treeSelectionModel" runat="server" />
    </SelectionModel>
    And I got error: Object doesn't support this property or method
    I check the javascript code below has the error:

    defaultAttributeFilter:function(attrName,attrValue){return typeof attrValue!="function"&&this.excludeAttributes.indexOf(attrName)==-1;}
    It seem to me that there is a bug in the above code for
    this.excludeAttributes.indexOf(attrName) since excludeAttributes is an array.
  5. #5
    I was unable to reproduce, please provide a full sample.
  6. #6
    It seems like I had an out of date version.
    Updated to Revision 3930 and it works fine.

    Thanks,

Posting Permissions