How to disable the button based on Grid rows count using jquery
- by kumar
Hello friends,
I have a button on the view.. I need to make disable based row count in the jquery grid..
that is if Rows are comming lessthen 100 I need to make Disable that button?
any idea about this?
here is my code..
<script type="text/javascript">
$(document).ready(function() {
var RegisterGridEvents = function(excGrid) {
//Register column chooser
$(excGrid).jqGrid('navButtonAdd', excGrid + '_pager',
{ caption: "Columns",
title: "Reorder Columns",
onClickButton: function() {
$(excGrid).jqGrid('columnChooser');
}
});
$(".ui-pg-selbox").hide();
$('.ui-jqgrid-htable th:first').prepend('Select All').attr('style', 'font-size:7px');
//Register grid resize
$(excGrid).jqGrid('gridResize', { minWidth: 350, maxWidth: 1500, minHeight: 400, maxHeight: 12000 });
};
$('#specialist-tab').tabs("option", "disabled", [2, 3, 4]);
$('.button').button();
RegisterButtonEvents();
RegisterGridEvents("#ExceptionsGrid")
});
**var a = $("#ExceptionsGrid").jqGrid('getGridParam', 'records').toString();
alert(a);**
</script>
is this right where I am doing this?
thanks