I have a requirement to populate a grid dynamically based on the selection of a view. I have followed the links below to populate the grid dynamically.
Problem showing jqgrid with dynamic column binding
It uses two ajax calls. One to get the ColModel and ColNames for the JqGrid and the second call to get the colData. The data returned is only for the current Page (ie 20 records -Pagesize 20).
The problem I have is my server side paging is not working. When I clicked on the next button on the pager, only the first page is loaded again.
The code in the handler is as follows
var numberOfRows = context.Request["rowsPerPage"];
int nRows, iPage;
if (String.IsNullOrEmpty(numberOfRows) || !int.TryParse(numberOfRows, NumberStyles.Integer, CultureInfo.InvariantCulture, out nRows))
nRows = PageSize; // default value
var pageIndex = context.Request["pageIndex"];
if (String.IsNullOrEmpty(pageIndex) || !int.TryParse(pageIndex, NumberStyles.Integer, CultureInfo.InvariantCulture, out iPage))
iPage = 1; // default value
context.Request["rowsPerPage"] and context.Request["pageIndex"] always returns null and gets set to the default values. What am I missing. Please help.