If you are performing remote paging then you should return curPage property in the response indicating current page. there should be a check in the remote script so that curPage doesn't exceed total number of pages.
If total rows is 1, then return
{ totalRecords: 1, curPage: 1, data: [....] }
If total rows is 0, then return
{ totalRecords: 0, curPage: 1, data: [] }