I'm stuck with a data source and a grid. The data is to be shown in a grid but I can't get it too work.
<
div
id
=
"grid"
></
div
>
<
script
>
$(document).ready(function() {
var d={"count":0,"subTotal":0,"items":{"sku":"dvdwinf","title":"Doctor Who:
Inferno","price":19.95,"format":"DVD","url":"drwho/doctor-who-inferno/dvdwinf","quantity":1}}
$("#grid").kendoGrid({
dataSource: {
data: d,
pageSize: 10
},
schema: {
data: "items"
},
height: 250,
scrollable: true,
sortable: true,
pageable: true,
columns: [
{
field: "sku",
title: "First Name"
},
{
field: "title"
}
]
});
});
</
script
>
The data to show will be a from a web service but for now it is hot-wired in there for testing. The JSON object is properly formatted and the EXACT data is used with a jQuery AJAX request elsewhere and used just fine. Any ideas?