Header checkbox is not getting selected

Posted by Sheetal.Swamy under jQuery on 9/29/2011 | Points: 10 | Views : 6149 | Status : [Member] | Replies : 0
I am adding a custom checbox in jqgrid header and child checkboxes in jqgrid row using formatter. Child checkboxes getting checked and unchecked but header checkbox is not getting checked. Can anybody tell me why it is happening so and what i can do for selecting/unselecting the header checkbox.

Below is my code:
$(document).ready(function () {
url: '/Email/LoadSelectedRMSUser/',
mptyrecords: "No Records to view",
datatype: 'json',
mtype: 'GET',
colNames: ['<input type=checkbox id=chkParent name=Parent checked=checked/>', 'ID'],
colModel: [
{ name: 'Child', width: 100, formatter: chkChild, sortable: false },
{ name: 'ID', index: 'ID', key: true, width: 40, align: 'left'}],
pager: jQuery('#RMSpager'),
rowNum: 5,
rowList: [2, 5, 10, 15, 20],
sortname: 'ID',
sortorder: "asc",
viewrecords: true,
width: '100%',
height: '100%',
imgpath: '/Content/themes/base/images',
caption: 'User List'
}); //End of Grid
function chkChild() {
return "<input type='checkbox' id='chkChild' name='Child'/>";

Thanks in advance,


(No response found.)

Login to post response