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

Append method adds nodes at nesting different than expected

1 Answer 66 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Richard
Top achievements
Rank 1
Richard asked on 24 Feb 2012, 02:38 PM
In a click event I dynamically add a new descent path at the top level of the treeview (at parent=null).  The problem is that new nodes do not match the css used to color the different levels.

In firebug it looks like my original levels are started in <LI> tags and the new appended nodes are started in <UL>

http://jsfiddle.net/6dKwH/

Any tips on .append() or css are appreciated!

1 Answer, 1 is accepted

Sort by
0
Richard
Top achievements
Rank 1
answered on 27 Feb 2012, 01:46 PM
This seems to work for me

parent = $("#tree").data("kendoTreeView").wrapper;
$("#tree").data("kendoTreeView").append({ text: 'New top-level peer' }, parent);
Tags
TreeView
Asked by
Richard
Top achievements
Rank 1
Answers by
Richard
Top achievements
Rank 1
Share this question
or