I'm going to propose a little transformation to your JSON so it would look like this:
[
{ Id : "Report 1", Data: [ ] },
{ Id : "Report 2", Data: [ ] }
]
Where Id
is the text that we want to show a label for the tab and Data
is the content of the tree
.
Start adding an initial (empty) content to each tab.
$.each(data, function(idx, elem) {
elem.Content = "<div>hello</div>";
});
So you can do:
// Create TabStrip
var ts = $("#tabstrip").kendoTabStrip({
dataTextField: "Id",
dataContentField: "Content",
dataSource: data
}).data("kendoTabStrip");
Now for each tab, create the tree:
$.each(data, function(idx, item) {
var c = ts.contentElement(idx);
$(c).kendoTreeView({
dataSource : item.Data
});
});
You can see it running here : http://jsfiddle.net/OnaBai/x6Acn/1/