hello,
the datasource is a valid json but i can't get the grid to display the data (see below).
am i doing something wrong or is it not supposed to work?
thankful for any Help!
viktor
var dataSet = [
{
"Id": "datatests/57238",
"Name": "11hacAMT02",
"Total|Fam": 96,
"Total|Mean": 2.4,
"Total|N1": 21,
"Total|TixP": 57,
"Filter Like|Var": 1.1,
"Age__25-29_Fam":89
},
];
var layout = [
{
field: "Name",
title: "Name"
},
{
field: "Total|N1", //Uncaught ReferenceError: Total is not defined
title: "Total<br>N1"
},
{
field: "Filter Like|Var", //Uncaught Error: Invalid template
title: "Filter Like<br>Var"
},
{
field: "Age__25-29_Fam", //Uncaught Error: Invalid template
title: "Age 25-29<br>Fam"
}
];
var localDataSource = new kendo.data.DataSource({ data: dataSet });
$("#grid").kendoGrid({
dataSource: localDataSource,
columns:layout
});
the datasource is a valid json but i can't get the grid to display the data (see below).
am i doing something wrong or is it not supposed to work?
thankful for any Help!
viktor
var dataSet = [
{
"Id": "datatests/57238",
"Name": "11hacAMT02",
"Total|Fam": 96,
"Total|Mean": 2.4,
"Total|N1": 21,
"Total|TixP": 57,
"Filter Like|Var": 1.1,
"Age__25-29_Fam":89
},
];
var layout = [
{
field: "Name",
title: "Name"
},
{
field: "Total|N1", //Uncaught ReferenceError: Total is not defined
title: "Total<br>N1"
},
{
field: "Filter Like|Var", //Uncaught Error: Invalid template
title: "Filter Like<br>Var"
},
{
field: "Age__25-29_Fam", //Uncaught Error: Invalid template
title: "Age 25-29<br>Fam"
}
];
var localDataSource = new kendo.data.DataSource({ data: dataSet });
$("#grid").kendoGrid({
dataSource: localDataSource,
columns:layout
});