4 Answers, 1 is accepted
0
Richard
Top achievements
Rank 1
answered on 08 Apr 2012, 08:02 PM
Hi David:
I don't think there is a configuration setting for such, and using an outright class='.k-state-selected' doesn't work because the .kendoTreeView method builds a scaffolding of html for displaying the original hierarchical data.
Fiddle http://jsfiddle.net/yt8Mc/11/ shows how you can select and open to a original item having a 'show-me' class,
I don't think there is a configuration setting for such, and using an outright class='.k-state-selected' doesn't work because the .kendoTreeView method builds a scaffolding of html for displaying the original hierarchical data.
Fiddle http://jsfiddle.net/yt8Mc/11/ shows how you can select and open to a original item having a 'show-me' class,
0
David
Top achievements
Rank 1
answered on 11 Apr 2012, 10:02 PM
Thank-you, that worked great.
0
Kyle
Top achievements
Rank 1
answered on 24 Apr 2012, 07:55 PM
This works great when using HTML elements, but is there a solution when the data is loaded dynamically?
0
Richard
Top achievements
Rank 1
answered on 25 Apr 2012, 04:13 AM
Add a property 'selected' to the dataSource.
Hope that helps
$('#datatree').kendoTreeView({ dataSource: [ { text: "Item 1", selected: true, items: [ { text: "Item 1.1"}, { text: "Item 1.1", selected: true}, { text: "Item 1.2"} ]}, { text: "Item 2"} ]});Hope that helps