Adding Child Nodes Dynamically

3 posts, 1 answers
  1. Charles
    Charles avatar
    9 posts
    Member since:
    Mar 2012

    Posted 18 Apr 2013 Link to this post

    Hey there.

    I've got a basic TreeView working. I'm using remote json data for the initial TreeView. What I need to do, is have the children added to the tree when the user clicks on the parent node. I'll need to make another call to the server for this next set of data since the node clicked contains a property I need in order to construct data property  required for the next rest call.

    Do you have any example of how this is done using binding to remote data?

    Thanks!
  2. Answer
    Charles
    Charles avatar
    9 posts
    Member since:
    Mar 2012

    Posted 19 Apr 2013 Link to this post

    I've solved some of this issue using the REST version of the URL as shown here: 

    transport: {
        read: {
          url: function(options) {
          return kendo.format("http://services.odata.org/Northwind/Northwind.svc/Products({0})/Order_Details", options.ProductID);
          }
        }
      },
    Now my issue is that I need to know the values of the parent(s) options.ProductID's in order to make this work. Is there a way to get this value from the expanded node? For example if I have this kind of structure:

    /Category
    /Category/Item
    /Category/Item/Category

    When I click on that last node to expand it, I need to get the full path (if that makes sense). So I would want Category/Item/ or something like that.

    Thanks
  3. Kendo UI is VS 2017 Ready
  4. Keith
    Keith avatar
    12 posts
    Member since:
    Sep 2011

    Posted 05 Nov 2013 Link to this post

    Did you ever figure this out?
Back to Top