参考url: http://blog.csdn.net/baronyang/article/details/9323463
我的需求: 抓取数据生成的日志,日志中有部分是抓取失败的,需要将失败的发送到另一个部分,但是成功了的就不需要发送;
设置checkbox:
<th data-options="field:\'checked\',formatter:formatCK"><input type="checkbox" id="ckAll" name="DataGridCheckbox"/></th>
function formatCK(value,row){
if(row.result =="0"){ //抓取失败的行返回 checkbox,成功了的什么都不返回
return \'<input type="checkbox" class="ck" name="DataGridCheckbox"/>\';
}
}