TreeView with Self Referencing Hierarchy

2 posts, 0 answers
  1. Joey
    Joey avatar
    4 posts
    Member since:
    Aug 2016

    Posted 07 Sep Link to this post

    I'm trying to set up a TreeView. My json data from the server has IDs and Parent IDs that contain what the hierarchy is. Root levels have parentId of "NULL". Can I not specify my hierarchy self-referentially like this? Do I HAVE to make an "items: []" sub-structure in my JSON for each parent node?


    var ds = new{
                transport: {
                    read: function(e) {
                        //JSON is returned here. Example [{id: 50, parentId: "NULL", name: "abc"}, {id: 51, parentId: 50, name: "xyz"}]
                schema: {
                    model: {
                        id: "id",
                        parentId: "parentId",
                        fields: {
                            id: { type: "number" },
                            parentId: { type: "number", defaultValue: 0 }


  2. Dimiter Topalov
    Dimiter Topalov avatar
    314 posts

    Posted 10 Sep Link to this post

    Hi Joey,

    Please find the answer to this, and your other related question, in the following forum topic:

    Dimiter Topalov
    Telerik by Progress
    Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
Back to Top