Thanks for those very comprehensive solutions.
JSON returned from server is an object now in the suggested format.
The server side code is sending 10 records. Actually it is sending the number of records after "interpreting the parameters start, limit". The test client for it at server side where I manually use start and limit values in range of 10 such as 0,10 or 10,20 (format is start, limit), works well and always prints 10 records JSON.
However, while hitting from client, the following happens.
1st request - grid: 10 records - server log values start 0, limit 10, page 1
next page click - grid: 25 records - server log values start: 25, limit:25, page 2
next page click - grid: 25 records - server log values start: 50, limit:25, page 3
Only in 1st loading of grid , are the configured values for start and limit used. Earlier I thought that the values may be getting distorted because may be I am returning more than 10 records but the testclient (where i explicitly give values in range of 10) is ok.
Where could the values be changing for start and limit. Any suggestions.
In all the cases, the bottom of paging toolbar shows something like
It seems the grid is hell bent in showing the results in sets of 3. The server side code is correct as per my knowledge. Here is the interface:
Page 1 (or 2 or 3) of 3
Displaying 25-50 of 75
It is correctly returning values between start and limit. But the values themselves are getting changed after intial load. As evident from checking logs.
public JSONObject getUserJSON(int startIndex,int limit)
Where I am i going wrong ? Anything wrongly configured in grid ?