Brand new to the KendoUI grid tool. Some of the other developers on my team have this working, but they are building the datasource and grid as variables and then using jQuery to associate these values to the grid. I'm trying to learn the basics and build it in JSP from scratch. I think I've more or less duplicated their grid settings. The problem I'm having is that when setting "data : data" in the schema, the grid doesn't popup at all. If I take that line out, the grid shows up but no data gets populated in the grid.
I was hoping someone can look over this code and tell me where I'm going wrong. At the least, what does it mean when the grid doesn't popup at all when setting "data : data"?
<div id="tableGrid">
<div id="grid"></div>
<script>
var dataSource = new kendo.data.DataSource({
transport : {
read : {
type : "POST",
contentType: "application/json",
url: "/This URL should work because it works elsewhere"
},
parameterMap : function(options, operation) {
return JSON.stringify(options);
}
},
schema : {
data : data,
type : "json",
model : {
fields : {
Field1: { type: "number"}
}
}
},
serverFiltering : true,
serverGrouping : true,
serverSorting : true,
serverPaging : true,
pageSize : 10
});
alert(JSON.stringify(dataSource));
$("#grid").kendoGrid({
dataSource: dataSource,
pageable: true,
});
</script>
</div>