how to get this row count for jquery grid..
- by kumar
I used this code to get the count of records in the jquery grid
var numRows = jQuery("#mygrid").jqGrid ('getGridParam', 'records');
when i place anywhere in my view after or before grid?? am allways geting 0 result.. bec its allways taking before grid loading..
i need to place this code where i need to check after grid loading..
if i put something like this.
alert("hello");
var numRows = jQuery("#mygrid").jqGrid ('getGridParam', 'records');
alert(numRows);
first if i keep any alert message and then if i count i am getting the number of records..
but if i give directly this code
var numRows = jQuery("#mygrid").jqGrid ('getGridParam', 'records');
alert(numRows);
i am getting out put as 0..
i dont know why its behaving like this.. if we keep first alert box anywhere for second alert box i am getting rowcounts..
can anybody help me out ..
thanks