Javascript 选中或取消选中jqgrid中的复选框
我创建jqgrid时,在一行中使用复选框Javascript 选中或取消选中jqgrid中的复选框,javascript,jquery,checkbox,jqgrid,Javascript,Jquery,Checkbox,Jqgrid,我创建jqgrid时,在一行中使用复选框 { name: 'Confirm', index: 'Confirm', width: 100, sortable: false, formatter: function (rownum, cellvalue, options, rowObject) { return "<input type='checkbox' id='check' />"; } },
{
name: 'Confirm', index: 'Confirm', width: 100, sortable: false,
formatter: function (rownum, cellvalue, options, rowObject) {
return "<input type='checkbox' id='check' />";
}
},
{
名称:'Confirm',索引:'Confirm',宽度:100,可排序:false,
格式化程序:函数(rownum、cellvalue、options、rowObject){
返回“”;
}
},
我的网格状
我需要根据最后一列的值选中或取消选中
如果值为“确认”,则表示我需要选中复选框
如果最后一列值未确认,则表示我需要取消选中该复选框
注意:我加载了从JSON获取的网格值,请尝试以下操作:
$('tr td:last-child').each(function(){
if($(this).text()=="Confirmed")
$(this).prev().find('input').prop('checked', true);
else
$(this).prev().find('input').prop('checked', false);
});
你能分享呈现出来的html吗?@milindiantwar我在JqGrid中创建了文本框。这是有疑问的