Sorry I got click-happy. Trying to use a PanelBar in MVVM.
Here's the datasource:
ExtrasDataSource:
new
kendo.data.HierarchicalDataSource({
transport: {
read: {
url: dataUrl +
"/GetAllListingExtrasForLocation"
,
dataType:
"json"
,
contentType:
"application/json"
,
type:
"POST"
},
parameterMap:
function
() {
var
sendData = {
location: listingModel.get(
"listingData.Agency"
),
resourceClass: listingModel.ResourceClass(),
listingId: listingId
};
return
kendo.stringify(sendData);
}
},
schema: {
data:
"d"
,
model: {
children:
"Items"
}
}
})
And the HTML:
<
script
id
=
"extraDetailTemplate2"
type
=
"text/x-kendo-template"
>
<
div
>
<
span
>#= TypeName #</
span
>
<
div
data-role
=
"listview"
data-template
=
"extraDetailTemplate"
data-bind
=
"source: Items"
></
div
>
</
div
>
</
script
>
<
div
data-role
=
"panelbar"
data-text-field
=
"TypeName"
data-template
=
"extraDetailTemplate2"
data-bind
=
"source: ExtrasDataSource"
>
</
div
>
The names come out fine for the panel items but all the children just say "undefined".
I've seen some other posts saying that you can't render a databound panelbar with a template, but they were old so I figured I'd check back on that as well. The output doesn't appear to be using the template so I'm assuming that is still the case.
Thanks in advance!
Kevin