Hello,
I am trying to familiarise myself with the kendo ui dataSource, I have never before used JSON and have constructed the following using your documentation:
Html:
Json File:
The grid doesn't load any data, all I see are the headers.
I have tried this using simply HTML and a JSON file, I have also tried this in Visual Studio.
Any help would be appreciated,
Andrew.
I am trying to familiarise myself with the kendo ui dataSource, I have never before used JSON and have constructed the following using your documentation:
Html:
<!doctype html>
<
html
>
<
head
>
<
title
>Kendo UI Web</
title
>
<
link
href
=
"styles/kendo.common.min.css"
rel
=
"stylesheet"
/>
<
link
href
=
"styles/kendo.default.min.css"
rel
=
"stylesheet"
/>
<
script
src
=
"js/jquery.min.js"
></
script
>
<
script
src
=
"js/kendo.web.min.js"
></
script
>
</
head
>
<
body
>
<
div
id
=
"grid"
></
div
>
<
script
>
$(document).ready(function () {
var myDataSource = new kendo.data.DataSource({
transport: {
read: {
url: "people.json",
dataType: "json"
}
}
});
$("#grid").kendoGrid({
dataSource: myDataSource,
columns: [
{
field: "firstName",
title: "First Name"
},
{
field: "lastName",
title: "Last Name"
}]
});
});
</
script
>
</
body
>
</
html
>
{
"people": [
{ "firstName":"John" , "lastName":"Doe" },
{ "firstName":"Anna" , "lastName":"Smith" },
{ "firstName":"Peter" , "lastName":"Jones" }
]
}
I have tried this using simply HTML and a JSON file, I have also tried this in Visual Studio.
Any help would be appreciated,
Andrew.