I have a grid that gets populated based on the selection in a treeview.
It all works great except for the (server side) paging.
Here's the problem:
First: I populate the grid with a data set that has 12 pages, and I click on the sixth page.
Next: When I click on a another tree node for data that only has two pages, it will run dataSource.read to load new data into the grid
Problem: The request will still send data as if it's still trying to get page 6, instead of resetting page numbers based on the new data set.
How can I get the pager to reset when I call dataSource.read?
function
onSelect(e) {
$(
'#grid'
).data(
'kendoGrid'
).dataSource.read({ FolderID: $(
'#treeview'
).data(
'kendoTreeView'
).dataItem(e.node).id });
$(
'#currentNode'
).val($(
'#treeview'
).data(
'kendoTreeView'
).dataItem(e.node).id);
}
Here's the problem:
First: I populate the grid with a data set that has 12 pages, and I click on the sixth page.
Next: When I click on a another tree node for data that only has two pages, it will run dataSource.read to load new data into the grid
Problem: The request will still send data as if it's still trying to get page 6, instead of resetting page numbers based on the new data set.
How can I get the pager to reset when I call dataSource.read?