I tried your suggestion:
grid = $(
but after setting the page size to 2 in case of a grid containing 11 elements, I get the following:
At the first page there are 2 elements, so its correct.
At the second page there are 9 elements
At the third page there are 7 elements
and so on, decrement by 2 every page until the end.
What could couse these duplications?
I use a grid initialized from local json data.
If I set the dataSource pageSize to 2 at the Grid initialization, there is no problem.