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

Unable to get value of the property '_getHierarchicalIndex': object is null or undefined

1 Answer 50 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Guy
Top achievements
Rank 1
Guy asked on 13 Feb 2014, 09:26 AM
I am sometimes getting this error after removing a node from the TreeView using the following code client-side:

parent.get_nodes().remove(node);

I've read in another post they I should call trackChanges() before and commitChanges() after modifying the TreeView to have my changes persisted to the server:
http://www.telerik.com/forums/unable-to-get-value-of-the-property-gethierarchicalindex-object-is-null-or-undefined

but I'm populating my TreeView entirely client-side in javascript (and don't need to have anything persisted to the server). I did try to call those methods as suggested but I still get the error.

Thanks for your help!
Guy

1 Answer, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 17 Feb 2014, 11:46 AM
Hello Guy,

We are not aware of such known issue but one thing that may be helpful is to check if the node you are trying to remove is in the nodes collection as in the code below:
if(parent.get_nodes().indexOf(node)!=-1){
    parent.get_nodes().remove(node);
}

If it doesn't help please share the exact code to that will help us replicate the issue locally and be able to inspect it and find a possible solution.

Regards,
Plamen
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the UI for ASP.NET AJAX, subscribe to the blog feed now.
Tags
TreeView
Asked by
Guy
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Share this question
or