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

[Solved] How to add a new node via JavaScript dynamically?

2 Answers 55 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Chanva
Top achievements
Rank 1
Chanva asked on 01 Nov 2010, 10:59 AM
I don't find such feature when I develop a pure AJAX application.

I can just use the dataBind method to implement it. The solution has a little bug, the icon at the left cannot be displayed.

 

var treeview = $('#catalogTreeView');
var parentNode = treeview.find("input[value='" + data.model.parentID + "']").closest('.t-item');
var treeObject = treeview.data("tTreeView");
treeObject.collapse(parentNode);
treeObject.dataBind(parentNode, data.model.updatedNodes);
treeObject.collapse(expand);

2 Answers, 1 is accepted

Sort by
0
troy
Top achievements
Rank 1
answered on 08 Jan 2012, 10:58 PM
Any solution to this?
0
Alex Gyoshev
Telerik team
answered on 09 Jan 2012, 09:30 AM
The bug should be fixed in newer versions. Also, the client-side API for adding/removing items is scheduled for the Q1 release.

Greetings,
Alex Gyoshev
the Telerik team
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 Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now
Tags
TreeView
Asked by
Chanva
Top achievements
Rank 1
Answers by
troy
Top achievements
Rank 1
Alex Gyoshev
Telerik team
Share this question
or