This is a migrated thread and some comments may be shown as answers.

Kendo TreeView

1 Answer 80 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Adolfo Marinucci
Top achievements
Rank 1
Adolfo Marinucci asked on 29 Jul 2016, 04:54 PM

Hi all,

It seems that TreeView can't show nodes children if model has a property called exactly 'children'.

For example it doesn't show child nodes if bound to model like this:

var inline = new kendo.data.HierarchicalDataSource({
    data: [
        {
          categoryName: "Storage",
            subCategories: [
            { subCategoryName: "Wall Shelving" },
            { subCategoryName: "Floor Shelving" },
            { subCategoryName: "Kids Storage" } ],
            children:[]
        },
        {
          categoryName: "Lights",
            subCategories: [
            { subCategoryName: "Ceiling" },
            { subCategoryName: "Table" },
            { subCategoryName: "Floor" }],
          children:[]                       
        }
    ],
    schema: {
        model: {
            children: "subCategories"
        }
    }
});

 

This is an example:

http://dojo.telerik.com/OQuFo

 

It's a bug or is intended?

 

Adolfo Marinucci

 

 

 

1 Answer, 1 is accepted

Sort by
0
Accepted
Alex Gyoshev
Telerik team
answered on 02 Aug 2016, 07:02 AM

Hello Adolfo,

This name is reserved for the children field of the Node instances, which needs to hold child DataSource instances, rather than the data itself. This is documented in the datasource schema.model configuration.

Regards,
Alex Gyoshev
Telerik by Progress
 
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
 
Tags
TreeView
Asked by
Adolfo Marinucci
Top achievements
Rank 1
Answers by
Alex Gyoshev
Telerik team
Share this question
or