tonytomov/jqGrid — pull request #467 by OlegKi (2013-05-23 10:56:55+00:00)
Title: Fixing resetting of page=0 to 1

Hello Tony,

after writing [the answer](http://stackoverflow.com/a/16679401/315935) on stackoverflow I analysed the code of jqGrid where `page`, `lastpage` and `records` are used and especially where `page` will be read from JSON or XML. The current jqGrid code ignore numeric `0` input value and additionally reset `page` value `0` to `1` before starting or reloading (in `populate`).

I suggest to fix the code by usage of existing `intNum` function which do exactly what one needs. Additional advantage will be conversion of `page`, `lastpage` and `records` directly to `number`. The parameters will be used in many places of the code in compare operation (like `<` or `===`) and usage numbers simplify the logic. Moreover one will fix additionally wrong input values of `page`, `lastpage` and `records` directly to default values.

Best regards
Oleg