Hello friends, I need to get the row count before grid loads.. Based on Row count I need to make some validation to the button. using jquery..
Here is my code using to get the jquery grid row count
var rowCount = $("#Grid").jqGrid('getGridParam', 'records');
if (rowCount < 100) {
$('#btnAll').attr('disabled', 'disabled');
}
else {
$('#btncancel').attr('disabled', 'disabled');
}
but roCount I am allways getting 0.. this count is getting before grid load.. Here is the Grid Event which is binding.
var RegisterGridEvents = function(excGrid) {
//Register column chooser
$(excGrid).jqGrid('navButtonAdd', excGrid + '_pager',
{ caption: "Columns",
title: "Reorder Columns",
onClickButton: function() {
$(excGrid).jqGrid('columnChooser');
}
});