grouping with aggregates
by valchev
HTML
<script src="http://cdn.kendostatic.com/2012.1.515/js/kendo.all.min.js"></script>
<link rel="stylesheet" href="http://cdn.kendostatic.com/2012.1.322/styles/kendo.common.min.css">
<link rel="stylesheet" href="http://cdn.kendostatic.com/2012.1.322/styles/kendo.default.min.css">
<input type="button" onclick="read();" value="read" />
CSS
input {
margin: 30px;
padding: 5px;
}
JavaScript
var dataSource = new kendo.data.DataSource({
transport: {
read: {
//using jsfiddle echo service to simulate JSON endpoint
url: "/echo/json/",
dataType: "json",
type: "POST",
data: {
// /echo/json/ echoes the JSON which you pass as an argument
json: JSON.stringify(
{"TestCallParamResult":"you passed: HI"}
)
}
}
},
schema: {
data: function(data) {
return [data]
}
},
change: function() {
var msg = this.view()[0];
alert(msg.TestCallParamResult);
}
});
function read() {
dataSource.read();
}