Hi, I am facing an issue when using JQGrids.
I have a JQGrid whose rowNum is set to 10. I have this code in my javascript:
rowNum: 10,
height: 160,
width: 742,
shrinkToFit: false,
sortname: 'CreditRequestID',
sortorder: "asc",
viewrecords: true,
Now my source for populating the grid is in the model. So say my model.SearchResults has 25 records. So the first time this grid is loaded I am populating 10 records. I have a more.. Link which when clicked should add 10 more records to the grid so total displayed is 20.
My grid will also execute the following controller code:
public ActionResult RecentActivityResultsGridEventHandler(string sidx, string sord,
int page, int rows)
{
int pageIndex = Convert.ToInt32(page) - 1;
int pageSize = rows;
int totalRecords = 20;
int totalPages = (int)Math.Ceiling((float)totalRecords / (float)pageSize);
var JSONData = {//code to read the records from model.SearchResults
//and assign column by column to grid
}
}
I wanted to increment rowNum
of the grid by 10 dynamically each time when the user clicks the more..
link. Any help would be appreciated.