Knockout-Kendo Grid pager not updating
While using Knockout and KendoUI I came across a paging issue. The pager wouldn't update but the grid rows did. This only occurred with Internet Explorer and I was able to reproduce it with IE 9 and 11.
In Chrome the pager updated fine.
In the end, the fix was to detect when the data had changed then refresh the pager.
In my javascript I used:
ui.tasksUpdated = function () {
var element = $("#grid");
var grid = element.data('kendoGrid');
grid.pager.setDataSource(grid.dataSource);
grid.pager.refresh();
grid.refresh();
}
Strictly speaking I don't think the 2 refresh methods are needed as it seems that the setDataSource method does it all.
No comments:
Post a Comment