Reputation: 13
When I use the following code (returning JSON from URL):
<ul id="vacancies"/>
<script>
var dataSource = new kendo.data.DataSource({
transport: {
read: {
url: "/MemberBack/GetVacancies",
dataType: "json"
}
},
schema: {
model: {
id: "VacancyId",
hasChildren: false
}
}
});
$('#vacancies').kendoPanelBar({
dataSource: dataSource
});
</script>
I get:
It is definately calling the serverside which is returning the List, it only errors when I try to bind it.
Upvotes: 0
Views: 103
Reputation: 407
The PanelBar internally works with a HierarchicalDataSource. I have noticed that you have set the flat DataSource instead. Update the DataSource to a HierarchicalDataSource:
var dataSource = new kendo.data.HierarchicalDataSource
Here is an updated example:
Upvotes: 1