隐藏easyui-datagrid表头的checkbox
html
<table id="DataGrid" class="easyui-datagrid" style="width: 100%;" data-options="toolbar:'#toolbar',rownumbers:true,pagination:true,pageSize:100,fit:true">
<thead>
<tr>
<th field="ck" checkbox="true"></th>
<th field="PermissionID" sortable="true" width="50" align="center">权限ID</th>
<th field="PermissionName" sortable="true" width="150" align="center">权限名称</th>
<th field="UpdateBy" sortable="true" width="100" align="center">更新人</th>
<th field="UpdateDate" sortable="true" width="150" align="center">更新时间</th>
</tr>
</thead>
</table>隐藏easyui-datagrid表头的checkboxjquery:
function initTable(queryData) {
$("#DataGrid").datagrid({
url: '/Rights/Permission/GetPermission',
nowrap: true,
striped: true,
sortOrder: 'asc',
remoteSort: false,
idField: 'PermissionID',
queryParams: queryData,
pageSize: 100,
pageList: [10, 20, 50, 100],
singleSelect: true,
onLoadSuccess: function () { //隐藏表头的checkbox
$("#DataGrid").parent().find("div.datagrid-header-check").children("input[type='checkbox']").eq(0).attr("style", "display:none;");
}
});
隐藏easyui-datagrid表头的checkbox
onLoadSuccess: function () { //隐藏表头的checkbox
$("#DataGrid").parent().find("div.datagrid-header-check").children("input[type='checkbox']").eq(0).attr("style", "display:none;");
}隐藏easyui-datagrid表头的checkbox

本文介绍如何使用jQuery在EasyUI DataGrid加载完成后隐藏表头的全选复选框,通过设置回调函数onLoadSuccess来定位并隐藏指定元素。
865

被折叠的 条评论
为什么被折叠?



