I am receiving this error when attempting to bind data from a file with Kendo UI
TypeError: 'undefined' is not an object (evaluating 'b.length')
I'm loading the JSON from a local file (data.json) with a fairly simply datastructure.
here is my data:
{"data":{
"Product":"Bacon",
"Price":19.56123,
"Quantity":5
},
{
"Product":"Pancakes",
"Price":13.91123,
"Quantity":17
}}
and here is my Kendo initializer
$("#remote").kendoGrid({
sortable: true,
dataSource:
{
type: "json",
transport:
{
read: "data.json"
},
schema:
{
data:"data",
/*
model:
{
fields:
{
"Product": { type: "string" },
"Price": { type: "number" },
"Quantity": { type: "number" }
}
}*/
},
pageSize: 3,
serverPaging: false,
serverFiltering: false,
serverSorting: false
},
columns:
[
{
field: "Product",
title: "Product Name"
},
{
field: "Quantity",
title: "Quantity"
},
{
field: "Price",
title: "Price",
template: '#= kendo.toString(Price, "c") #'
}
],
});
The error is the same with or without that Model field commented... I feel like this might be a jQuery dependency error (1.7.1), but I am not sure... any help or thoughts would be appreciated.
Thanks
TypeError: 'undefined' is not an object (evaluating 'b.length')
I'm loading the JSON from a local file (data.json) with a fairly simply datastructure.
here is my data:
{"data":{
"Product":"Bacon",
"Price":19.56123,
"Quantity":5
},
{
"Product":"Pancakes",
"Price":13.91123,
"Quantity":17
}}
and here is my Kendo initializer
$("#remote").kendoGrid({
sortable: true,
dataSource:
{
type: "json",
transport:
{
read: "data.json"
},
schema:
{
data:"data",
/*
model:
{
fields:
{
"Product": { type: "string" },
"Price": { type: "number" },
"Quantity": { type: "number" }
}
}*/
},
pageSize: 3,
serverPaging: false,
serverFiltering: false,
serverSorting: false
},
columns:
[
{
field: "Product",
title: "Product Name"
},
{
field: "Quantity",
title: "Quantity"
},
{
field: "Price",
title: "Price",
template: '#= kendo.toString(Price, "c") #'
}
],
});
The error is the same with or without that Model field commented... I feel like this might be a jQuery dependency error (1.7.1), but I am not sure... any help or thoughts would be appreciated.
Thanks