jqgrid select checkbox of subgrid on parent checkbox grid event
<p>I have parent grid along with the subgrid with multiselect true in both. If i select parent check box then subgrid check box should be checked  &amp; if select all in parent grid then all check box subgrid rows will be checked. </p>

<p>How can i achieve this ?</p>

<pre><code>Query("#JobCardSubmissionGrid").jqGrid({
datatype: '',
height: 300,
width: 1000,
colNames: ['JobcardLevelReconciledAttendanceID', 'Workdate', 'Shift'],
colModel: [
        { name: 'JobcardLevelReconciledAttendanceID', index: 'JobcardLevelReconciledAttendanceID', width: 1, hidden: true, sortable: false },
        { name: 'Workdate', index: 'Workdate', width: 100, sortable: false },
        { name: 'Shift', index: 'Shift', width: 100, sortable: false}],
multiselect: true,
caption: "JobCard Submission Grid",
pager: jQuery('#pageNavigation'),
viewrecords: true,
scrollrows: true,
shrinkToFit: true,
rowList: [20, 50, 100],
pgbuttons: true,
pgtext: "Page {0} of {1}",
altRows: true,
subGrid: true,
subGridOptions: {
    "plusicon": "ui-icon-triangle-1-e",
    "minusicon": "ui-icon-triangle-1-s",
    "openicon": "ui-icon-arrowreturn-1-e",
    "reloadOnExpand": false,
    "selectOnExpand": true
},
subGridRowExpanded: function (subgrid_id, row_id) {
    var subgrid_table_id, pager_id;
    subgrid_table_id = subgrid_id + "_t";
    subgridid = subgrid_table_id;
    pager_id = "p_" + subgrid_table_id;
    $("#" + subgrid_id).html("&lt;table id='" + subgrid_table_id + "' class='scroll'&gt;&lt;/table&gt;");
    jQuery("#" + subgrid_table_id).jqGrid({
        datatype: PageMethods.GetSubData(row_id, onGetListSubGridSuccess, onError),
        colNames: ['JobcardLevelReconciledAttendanceID', 'ShiftID', 'JobCardID', 'JobCardCode'],
        colModel: [
                    { name: 'JobcardLevelReconciledAttendanceID', hidden: true, width: 100 },
                    { name: 'ShiftID', width: 1, hidden: true },
                    { name: 'JobCardID', width: 100, hidden: true },
                    { name: 'JobCardCode', width: 100}],
        multiselect: true,
        height: '100%'
    });
}});
</code></pre>
