First of all sorry to post this here. I know this is not forum for jquery. I googled a lot on my problem and put my questions in jquery forums but didn't get solution. So I am posting it here hoping I may get a solution.
In a jqgrid, I have checkboxes in each row and i have a master checkbox at the column header. I want to catch the check event of the checkbox which is present in each row. I added the logic in loadComplete method. It worked fine.(Checkbox event handling). But it gives problem in pagination. I am unable to paginate. If I remove loadComplete method, pagination works fine. Is there any other way to get the checkbox check event from jqgrid columns or any solution to pagination with loadComplete method ?
This is my loacomplete method.
loadComplete: function(){
jQuery("#progAccessSearchResults").find("input:checkbox").click(function(){
var v=progAccessSearchResults.rows.length;
var count=0;
for(i=1;i<v;i++){
if("input[type='checkbox']:checked"){
jQuery("#mastercheck").attr("checked",false);
count=1;
}
}
count=jQuery("#progAccessSearchResults").find("input:checkbox:checked").length;
if(count==v-1 ){
jQuery("#mastercheck").attr("checked",true);
}
})
},
Checkbox in jqgrid is
{name:'checkbox',index:'checkbox', sortable:false, hidden : adminHide, align:"center", width: 80, resizable: false }