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

Parent data text field not recognized in Kendo TreeView when using data attribute initialization

1 Answer 258 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
leboart
Top achievements
Rank 1
leboart asked on 12 Mar 2013, 04:57 PM
I'm trying to using Kendo TreeView with attribute data initialization, following the official documentation.
As far as I understand, the next two portions of code should be equivalents:

1.- data attribute initialization style:

<div id="treeview-right"
           data-role="treeview"
           data-source="inline"
           data-text-field="['categoryName', 'subCategoryName']">
</div>
2.- JQuery style:

<script>
            $("#treeview-right").kendoTreeView({
            dataSource: inline,
            dataTextField: ["categoryName", "subCategoryName"]
            });
</script>
The way number 2 works as expected, but the number 1 renders the tree but without the parent node's text(showing 'undefined' text, like it doesn't recognize the 'categoryName' parameter from data-text-field value. By the way , when I set data-text-field to
data-text-field="['categoryName']
it shows the parent node text, but not the child node's text, as expected.
I'm using the examplefrom the official tutorial (JQuery style initialization),
 if someone wants to see the whole code. Is it correct my supposition?,
 Why with attribute data initialization doesn't work? .

1 Answer, 1 is accepted

Sort by
0
Accepted
Alex Gyoshev
Telerik team
answered on 13 Mar 2013, 11:14 AM
Hello Leboart,

Thank you for reporting this -- this turned out to be a bug, and we fixed it right away. The fix will be available in the next internal build, as well as in the upcoming official release. Your Telerik points have been updated for the bug report.

Regards,
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!
Tags
TreeView
Asked by
leboart
Top achievements
Rank 1
Answers by
Alex Gyoshev
Telerik team
Share this question
or