[code language=”javascript”]
$(‘#GridName’).data(‘kendoGrid’).dataSource.read();
$(‘#GridName’).data(‘kendoGrid’).refresh();
[/code]
read will request the server and reload only reload datasource. There will be no changes in the UI. refresh will re-render items in grid from the current datasource. That’s why both are required
http://stackoverflow.com/questions/18399805/reloading-refreshing-kendo-grid
Alternatif kalau ingin mengubah filter ketika me-reload grid:
[code language=”javascript”]
dataSource.query({
page: 1,
pageSize: 10,
filter: { field: "company_id", operator: "eq", value: companyId }
});
[/code]
Parameter page dan pageSize wajib ada, atau akan muncul masalah pada fungsi pagination.
Konfigurasi filter: http://docs.telerik.com/kendo-ui/api/javascript/data/datasource#configuration-filter