PDA

View Full Version : [CLOSED] SelectNode for 2.0



gets_gui
Apr 04, 2012, 6:40 PM
Hi,

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

Thanks,

Daniil
Apr 04, 2012, 6:56 PM
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>

gets_gui
Apr 04, 2012, 6:59 PM
Cool, thanks a lot!

gets_gui
Apr 05, 2012, 10:18 PM
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.

Daniil
Apr 06, 2012, 10:05 AM
I was unable to reproduce, please provide a full sample.

gets_gui
Apr 10, 2012, 3:46 PM
It seems like I had an out of date version.
Updated to Revision 3930 and it works fine.

Thanks,