一、例图:

二、jsp代码:
1、重写复选框样式
<style>
.moreCheckBox {
margin-top: 5px !important;
}
input[type=checkbox] {
width: 18px !important;
height: 18px !important;
}
</style>
2、对应的列
注意 formatter:moreCheckBox
<table data-toggle="topjui-datagrid"
data-options="id:'weldNdeTrust', <%--Id名称--%>
singleSelect:true, <%--可多选--%>
selectOnCheck:false, <%--点击行不勾选--%>
checkOnSelect:false, <%--勾选时不选中行--%>
url:'${ctx}/weld/weldNdeTrust/getPageSet'">
<thead>
<tr>
<th data-options="field:'autoId',title:'UUID',checkbox:true"></th>
<th data-options="field:'cxHoldSign',title:'冲洗保留',formatter: moreCheckBox"></th>
<th data-options="field:'holdSign',title:'试压保留',formatter: moreCheckBox"></th>
<th data-options="field:'zaiYuState',title:'是否在役',formatter: moreCheckBox"></th>
<th data-options="field:'ndeTrusted',title:'NDE委托',formatter: moreCheckBox"></th>
</tr>
</thead>
</table>
3、对应的脚本
设置复选框不可点击,不可操作,readonly=“readonly” 设置不起作用 用 οnclick=“return false;”
<script type="text/javascript">
function moreCheckBox(value, rec, rowIndex) {
var checked = "";
if(value == 1){
checked = "checked";
};
return "<input type='checkbox' onclick='return false;' class='moreCheckBox' name='" + this.field + rowIndex + "'" + checked +" >";
}
</script>