pagination for grid, first step for sorting