function formatSh(value, row, index) {
var d = "";
if (value && !row.posted) {
d = '<a href="javascript:check(' + value + ',' + index + ')" title="审核" >审核</a>';
} else if (row.posted) {
d = "(" + row.pzr + ")审核";
}
// var d = '<a href="#" title="查看" onclick ="ViewById(' + "'" + row+ "'" + ')">' + value + '</a>';
return d;
}
上面是format函数
下面是前台修改datagrid的值
$('#tbmain').datagrid('beginEdit', index);
$('#tbmain').datagrid('getRows')[index]['pzr'] = data;
$('#tbmain').datagrid('getRows')[index]['posted'] = 1;
$('#tbmain').datagrid('endEdit', index);
要修改formatSh对应的pzr才会生效