Started experimenting with Kendo to see how it could fit into our present work flow. Lot of stuff looks really promising. And the efforts put into documentation is also very commendable.
One thing I can't find is how to format json objects when using remote datasource in grid.
I have successfully managed to get a grid displaying the first set of records. But I can't get it to honor the fact that there are 491 records in total. Somehow the grid seems satisfied with displaying the first 20 records and stops there. The online demos I've found does not provide json examples, only odata, and in fact I can't get any of them to display what's returned from server using firebug. I have tried using labels like total, totalItems, totalFound etc to no avail.
Here's how the configuration is setup:
/Jolle
One thing I can't find is how to format json objects when using remote datasource in grid.
I have successfully managed to get a grid displaying the first set of records. But I can't get it to honor the fact that there are 491 records in total. Somehow the grid seems satisfied with displaying the first 20 records and stops there. The online demos I've found does not provide json examples, only odata, and in fact I can't get any of them to display what's returned from server using firebug. I have tried using labels like total, totalItems, totalFound etc to no avail.
Here's how the configuration is setup:
$(
"#grid"
).kendoGrid({
dataSource: {
transport: {
read: {
// the remote service url
url:
"ajax.lasso"
,
dataType:
"json"
,
// additional parameters sent to the remote service
data: {
ajax_action:
"getaccessreqlist"
}
}
},
// describe the result format
schema: {
// the data which the data source will be bound to is in the "results" field
data:
"results"
},
pageSize: 20,
serverPaging:
true
,
serverSorting:
true
},
height: 450,
scrollable:
true
,
sortable:
true
,
pageable:
true
,
columns: [
{
field:
"name"
,
title:
"Requirement Name"
,
template:
' + `'
<a href=
"./?edit/<#= recid #>/"
><#= name #></a>
'` + '
},
{
field:
"descr"
,
title:
"Description"
},
{
field:
"location_name"
,
title:
"Location / Site"
},
{
field:
"restriction"
,
title:
"Restriction"
}
]
});
/Jolle