Im trying to display the selected row in JQgrid. Now, i have this code:
onSelectRow:function(rowid){
var selectedRow = $('#mygrid').jqGrid('getGridParam', 'selarrrow');
$("#totalSelected").val(selectedRow .length);
}
Its work fine, but then when the 'select all' checkbox is checked, it didn't trigger this code, eventhough in visual we can see that all row has been selected.
so i'm thinking that if i know that the 'select all' checkbox is checked, i can set the total selected value like this:
if(//selectall checkbox is checked)
$("#totalSelected").val($("#mygrid tr").length-1);
I've tried this code by refering to this answer, but im pretty sure .checked() is not recognized:
if($("#cb_mygrid"[0].id).checked())
$("#totalSelected").val($("#mygrid tr").length-1);
Any idea is much appreciated