1. $("#jqgproduct").jqGrid('getGridParam', 'data').length;
2. $("#jqgproduct").getGridParam("reccount");
I tried in above both ways but it is showing 0 records even thought the grid has 3 records here is my complete code. please let me know where iam going wrong
var colNames = ['Status',
'Project Ref',
'Name',
'Customer',
'CreatedBy',
'Creation Date',
'LastModified'];
var colModel = [
{ name: 'ProductID', index: 'StatusId', align: 'left', width: 70 },
{ name: 'ProjectReference', index: 'ProjectReference', align: 'left', width: 100, formatter: 'showlink', formatoptions: { "baseLinkUrl": "/Order/Index"} },
{ name: 'Name', index: 'Name', align: 'left', width: 150, formatter: 'showlink', formatoptions: { "baseLinkUrl": "/Order/Index"} },
{ name: 'CustomerName', index: 'CustomerName', align: 'left', width: 150 },
{ name: 'Createdby', index: 'Createdby', align: 'left', width: 150 },
{ name: 'CreatedDate', index: 'CreatedDate', align: 'left', width: 100, formatter: 'date', formatoptions: { newformat: 'm/d/Y'} },
{ name: 'LastModified', index: 'LastModified', align: 'left', width: 100, formatter: 'date', formatoptions: { newformat: 'm/d/Y'} }
];
var sortname = 'Id';
var sortorder = 'desc';
SetGrid('#jqgproduct', '', url, colNames, colModel, sortname, sortorder, -1);
var numberOfRecords = $("#jqgproduct").jqGrid('getGridParam', 'data').length;
$("#jqgproduct").getGridParam("reccount");