Add tree node without reloading all data

3 posts, 0 answers
  1. Виталий
    Виталий avatar
    1 posts
    Member since:
    Jan 2012

    Posted 25 Jan 2012 Link to this post

    TreeView html:
    <ul id="ouTreeview">
       <li data-expanded="true" data-ouid="0" data-isexternal="false" data-parentid="0">
          <label>Root Element</label>

    Initializing treeview:

    <script language=
    "javascript" type="text/javascript">
        var ouTreeview;
        var selectedOUId;
        var selectedOUName;
        var ouTreeviewNode;
        var selectedParentId;
        var selectedOUIsExternal;
        function setSelectedTitleById(id) {
            selectedOUName = $(".ouLeftCol:first").find("#ouTreeview:first").find("li[data-ouid='" + id +"']:first").find("label:first").text();
        $(document).ready(function () {
            function onSelect(e) {
                ouTreeviewNode = e.node;
                selectedParentId = $(e.node).data("parentid");
                selectedOUIsExternal = ($(e.node).data("isexternal").toString().toLowerCase() ==='true');
                selectedOUId = $(e.node).data("ouid");
                    url: "@Url.Action("LoadOUForm", "DashBoard")",
                    type: "POST",
                    cache: false,
                    success: function (response) {
                        if (selectedOUId != "ROOT") {
                            if (selectedOUIsExternal)
            ouTreeview = $("#ouTreeview").kendoTreeView({ select: onSelect });

    I need append new tree node to existing tree with my attributes.
  2. James
    James avatar
    8 posts
    Member since:
    Nov 2011

    Posted 17 Apr 2012 Link to this post

    I am also facing the same issue, I am using Kendoui Dropdown list and Tree View, when dropdown list change event occours the treeview data will change but the TreeView style is not applied.

  3. Alex Gyoshev
    Alex Gyoshev avatar
    2527 posts

    Posted 17 Apr 2012 Link to this post

    TreeView nodes can be inserted without reloading all the data by calling one of the append, insertBefore and insertAfter methods.

    Alex Gyoshev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top