This is a migrated thread and some comments may be shown as answers.

node.select() results in 'undefined' is null or not an object

3 Answers 45 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Bo
Top achievements
Rank 1
Bo asked on 03 Jun 2011, 01:42 AM
I have an issue where we are using the load on demand mode to retreive nodes on a tree expand.  The tree is hosted inside of a radcombobox.  Node expand works as expected as well as node selection.  However, when the combo closes we collapse the root node, clear it's nodes and set expand mode back to webservice so the webservice will be called again on future expands.

However, after doing this I want to set the selected node in the list of those returned from the webservice if I have a match.  The issue is I get an error "Line: 1185 Char 6 'undefined' is null of not an object.  In stepping into the telerik javascript it seems that a selected node is hanging around possibly but is not fully initialized.

Anyone have any ideas or seen anything like this?

3 Answers, 1 is accepted

Sort by
0
Dimitar Terziev
Telerik team
answered on 08 Jun 2011, 09:59 AM
Hi Bo,

It's expected that you won't be able to select a node, since you have cleared the child nodes of the root element.

In case you want to select a particular node,this node should exist in the nodes collection of the RadTreeView.

Greetings,
Dimitar Terziev
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
Bo
Top achievements
Rank 1
answered on 08 Jun 2011, 03:48 PM
Dimitar,

That's just it.  I can retrieve the node from the rad tree client side either though getAllNodes and findNodeByValue.  The node returned is not null.  However, attempting to perform a .select on it results in an error.

Note that I'm performing the retrieval of the node client side after the tree has been reexpanded via the web service thus repopulating nodes that were cleared.
0
Dimitar Terziev
Telerik team
answered on 13 Jun 2011, 12:43 PM
Hi Bo,

Provide us with more information on the exact implementation of the client-side script used for node selection and also when exactly this script is executed.

Kind regards,
Dimitar Terziev
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Tags
TreeView
Asked by
Bo
Top achievements
Rank 1
Answers by
Dimitar Terziev
Telerik team
Bo
Top achievements
Rank 1
Share this question
or