easyui tree 树形菜单、treegrid树形表格 给某些指定节点添加显示复选框checkbox:
添加复选框的属性有:
checkboxboolean定义是否在每一个借点之前都显示复选框。falsecascadeCheckboolean定义是否层叠选中状态。trueonlyLeafCheckboolean定义是否只在末级节点之前显示复选框。false
如果要给指定节点添加:
checkbox不直接使用boolean,而是使用方法如下:
checkbox:function(row){return row.order_number?true:false}
<table singleSelect="true" class="easyui-treegrid" data-options="url: '',rownumbers:true,pagination:true,pageSize:10,idField: 'id',treeField: 'order_number',checkbox:function(row){return row.order_number?true:false}"> <thead> <tr> <th field="order_number" width="180">订单编号</th> </tr> </thead> </table>