Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8905793
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T02:29:01+00:00 2026-06-15T02:29:01+00:00

I have the following code: var cnt = 0; $(document).ready(function () { var data

  • 0

I have the following code:

    var cnt = 0;
    $(document).ready(function () {
        var data = [
            {
                "id":  cnt++,
                "text":"node_" + cnt
            }
        ];
        var tree = $("#treeview").kendoTreeView({
            dataSource:kendo.observableHierarchy(data)
        }).data("kendoTreeView");

        $("#push").click(function () {
            var pos = tree.dataItem(tree.select());
            pos.items.push({id:cnt++, text:"node_" + cnt});
        });

        $("#append").click(function () {
            var pos = tree.select();
            tree.append({id:cnt++, text:"node_" + cnt}, pos);
        });

        $("#show").click(function () {
            var data = tree.dataItem(".k-item:first");
            $("#content").html(JSON.stringify(data, null, 2));
        });
    });

And there are two functions:
1. push: once selected a node in the tree, it uses dataItem to get current data item and pushes one additional node into it (child node). This should be valid since dataSource is an ObservableHierarchy object.
2. append: once selected a node in the tree, it uses append to introduce one additional node into it (child node). This was valid on previous release of KendoUI and modify the tree but should not reflect changes in the DataSource.

The question / problem is:
1. If I use append the tree is update (visually) but the dataItem is not updated.
2. If I use push then dataItem is update but not the tree.
3. If I select a node, use append and then push, the tree is visually updated and the model too.

It seems that the first time that I introduce a child append updates some internal structure and from there the tree ‘observes’ the observable hierarchy put if I directly push it then the tree does not observe the observable hierarchy.

How should I insert nodes dynamically being able to check the DataSource and get the current state of the tree?

NOTE This is with the latest version of KendoUI Q2.1024.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T02:29:03+00:00Added an answer on June 15, 2026 at 2:29 am

    Ok so,I just got an answer on a ticket about this matter after 2 days.
    It is indeed a BUG which is already fixed in the latest builds,but the builds are only available for customers with an active subscription…

    It will be available for the rest of the community in the next official release (around March 2013).So currently the only solution is to purchase a commercial subscription and you will get immediate access to the new builds…

    Kinda disappointed with all this commercial stuff since it is a bug..But anyway,nothing we can do about it..
    At least we know we are not crazy,and in a few months we can replace our code with the fixed build. 😛

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have following code snippet: var reg = /^[0-9]$/; $('input[type=text]').keypress(function(){ console.log(reg.test(parseInt($(this).val()))); }); When I
I have the following code: var submitHandler = function ($link, $form, close) { var
I have the following code: var refreshId = setInterval(function() { $(#footad).html('myjshere'); }, 15500); Where
I have the following code: var images = document.getElementsByTagName('img'); if (screen.width > 640) {
I have the following code: var from = 0, step = 5; function showNext(list)
I have the following code: var entityConnection = (System.Data.EntityClient.EntityConnection)c.Connection; DbConnection conn = entityConnection.StoreConnection; ConnectionState
I have the following code: var string = word1;word2;word3,word4,word5,word6.word7; function ends_with(string, character) { var
I have the following code: var words = new Object(); $(li.words).each(function(){ var thisId =
I have the following code - var options = new Ext.data.JsonStore({ model: 'options_model', data:
I have the following code: var formSubmitHandler = function (link, form) { //e.preventDefault(); var

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.