easyui datagrid checkbox单选时表头的checkbox不起作用,将其隐藏
2015-07-08 10:23
435 查看
在easyui datagrid开发的过程中,某列是checkbox的,但是当单选时这个表头的框不起作用,将其隐藏。在网上找到的方法。
function InitGrid() {
$('#tg').treegrid({
idField: 'id',
treeField: 'descript',
pagination: false,
singleSelect: true,
height: 360,
title: "我的列表",
columns: [[
{ field: 'ck', width: 50, checkbox: true },
{ field: 'id', title: '编号', width: 50, align: 'center' },
{ field: 'descript', title: '名称', width: 120 }
]],
onLoadSuccess: function () {
$("#tg").parent().find("div .datagrid-header-check").children("input[type=\"checkbox\"]").eq(0).attr("style", "display:none;");
}
});
}
关键是在初始化时加上
onLoadSuccess: function () {
$("#tg").parent().find("div .datagrid-header-check").children("input[type=\"checkbox\"]").eq(0).attr("style", "display:none;");
}
这样就可以把表头的checkbox隐藏了。
function InitGrid() {
$('#tg').treegrid({
idField: 'id',
treeField: 'descript',
pagination: false,
singleSelect: true,
height: 360,
title: "我的列表",
columns: [[
{ field: 'ck', width: 50, checkbox: true },
{ field: 'id', title: '编号', width: 50, align: 'center' },
{ field: 'descript', title: '名称', width: 120 }
]],
onLoadSuccess: function () {
$("#tg").parent().find("div .datagrid-header-check").children("input[type=\"checkbox\"]").eq(0).attr("style", "display:none;");
}
});
}
关键是在初始化时加上
onLoadSuccess: function () {
$("#tg").parent().find("div .datagrid-header-check").children("input[type=\"checkbox\"]").eq(0).attr("style", "display:none;");
}
这样就可以把表头的checkbox隐藏了。
相关文章推荐
- Mac 下安装MySQL和GUI管理工具
- Serializable:serialVersionUID
- FtpWebRequest FTP异步下载、异步上传文件
- iOS UITableView索引列开发详解
- 使用Burp Suite爆破Web应用密码(转载)
- 第一个自己完成的leetcode( JAVA) Implement Queue using Stacks
- 原本存在项目,再次打开出现 'Building workspace'has encountered a problem.Errors occured during the build.
- ios 获取手机信息(UIDevice、NSBundle、NSLocale)
- Sprite (2D and UI)
- Samba常用配置及GUEST访问
- Win10 Mobile build 10158最新更新内容汇总:更流畅
- leetcode解题报告232——Implement Queue using Stacks
- block在俩个UIViewController间传值
- 百度UEditor使用
- 免费素材:包含 250+ 组件的 DO UI Kit
- Android UI 组件开源软件
- UISegmentControl/多段选择视图
- EasyUI 树型菜单 异步加载树
- 黑马程序员——JAVA笔记——GUI
- druid 数据源密码加密配置