Append method adds nodes at nesting different than expected

2 posts, 0 answers
  1. Richard
    Richard avatar
    148 posts
    Member since:
    Feb 2012

    Posted 24 Feb 2012 Link to this post

    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!
  2. Richard
    Richard avatar
    148 posts
    Member since:
    Feb 2012

    Posted 27 Feb 2012 Link to this post

    This seems to work for me

    parent = $("#tree").data("kendoTreeView").wrapper;
    $("#tree").data("kendoTreeView").append({ text: 'New top-level peer' }, parent);
Back to Top