aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes JQ Grid checkbox and pagination error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "JQ Grid checkbox and pagination error" Watch "JQ Grid checkbox and pagination error" New topic
Author

JQ Grid checkbox and pagination error

Nagendra Shastry
Greenhorn

Joined: Oct 26, 2010
Posts: 19

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 }
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JQ Grid checkbox and pagination error