Possible Duplicate:
Kendo UI Grid Always Starts at Page 0
Set up a Kendo UI grid and most of it is working fine, but at page load the pagable data is not loading correctly. (It is loading correct after changing items per page to 10 and is loading incorrect again after refreshing with the bottom right button)
My code:
<div id="example" class="k-content">
<div id="clientsDb">
<div id="grid"></div>
</div>
<script>
$(document).ready(function() {
$("#grid").kendoGrid({
dataSource: {
transport: {
read: "data/weight.php"
},
schema: {
data: "data",
},
pageSize: 5
}, height: 250,
scrollable: true,
sortable: true,
filterable: true,
pageable: {
refresh: true,
pageSizes: true
},
groupable: true,
selectable: true,
columns: [ {
field: "w_user",
width: 50,
title: "User"
} , {
field: "w_weight",
width: 70,
title: "Weight"
}, {
field: "w_stamp",
title: "Stamp",
width: 160,
template: '#= kendo.toString(w_stamp,"dd MMMM yyyy") #'
}, {
field: "w_comment",
title: "Comments"
}
]
});
});
</script>
</div>
First screen (incorrect): http://www.informatiebron.nl/images/scr1.png
Second screen (correct): http://www.informatiebron.nl/images/scr2_correct.png
Anyone an idea to solve this?
https://stackoverflow.com/a/14255509/2039657 had the solution/workaround. Thanks for that suggestion. In my case i needed the function to get it to work again.