I have a Jqgrid with a Checkbox given in the header Section.
colNames: ,
colModel: [
{ name: ‘ID’, index: ‘ID’, hidden: true, key: true },
{ name: ‘RI’, index: ‘RI’, hidden: true },
{ name: ‘Sel’, index: ‘Sel’, edittype: “checkbox”, search: false, width: 22,
formatter: function(cellvalue, options, rowObject) {
switch (cellvalue) {
case “Yes”: return “
“;
break;
default: return “
“;
break;
}
}, unformat: imageUnFormat
}]
Initally when Page Loading all the columns will be coming with out check box. When i clicked the chkmultiselect i want to mark checked in my columns. ie Update with another tag  “
“
Â
My abc Event: I want to update my “Sel” column with chkchk image.
function abc(e) {
e = e || event; /* get IE event ( not passed ) */
e.stopPropagation ? e.stopPropagation() : e.cancelBubble = true;
var mydata = $(“#list”).jqGrid(‘getGridParam’, ‘data’);
var gridId = jQuery(“#list”).getDataIDs();
//loop through grid rows
for (var countRow = 1; countRow <= gridId.length; countRow++) {
var rowId = gridId[countRow];
var beChecked = “
“;
var inputControl = beChecked;
jQuery(“#list”).jqGrid(‘setRowData’, rowId, {Sel: “
” });
}
if ($(‘#chkmultiSelect’).is(‘:checked’)) {
$(‘#chkmultiSelect’).prop(‘checked’, true);
}
else {
$(‘#chkmultiSelect’).prop(‘checked’, false);
}
}
Â
I am getting my chkmultiselect functioning correctly. but the grid column sel is not updating.
This is very urgent for me.. Any guesses why?
Â
ThanksDGS
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top