Easyui treegrid复选框设置
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Full Layout - jQuery EasyUI Demo</title>
<%@ include file="/common/taglibs.jsp"%>
<link id="easyuiTheme" href="${ctx}/res/js/easyui/themes/default/easyui.css" rel="stylesheet" type="text/css" />
<link href="${ctx}/res/style/common-metro.css" rel="stylesheet" type="text/css" />
<link href="${ctx}/res/js/easyui/themes/icon.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="${ctx}/res/js/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="${ctx}/res/js/jquery.corner.js"></script>
<script type="text/javascript" src="${ctx}/res/js/jquery.cookie.js"></script>
<script type="text/javascript"
src="${ctx}/res/js/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript">
var count = 0;
var PROJECT_URL = "${ctx}"; $(function() {
$('#treeGrid').treegrid({
url : PROJECT_URL+"/res/js/data/treedata.json",
idField : 'id',
treeField : 'name',
title:'资源列表',
rownumbers : "true",
onlyLeafCheck: true,
animate: true,
singleSelect: false,
columns : [ [
{
title : 'id',
field : 'id',
checkbox: true,
width : 100
}, {
title : 'resource name',
field : 'name',
width : 220
}, {
title : 'link',
field : 'size',
width : 120,
align : 'center'
}, {
field : 'date',
title : 'Begin Date',
width : 140,
align : 'center'
} ] ],
onSelected:set_power_status
});
$("#consle").bind("click", consleclick);
}); function set_power_status() {
var idList = "";
$("input:checked").each(function() {
var id = $(this).attr("id");
if (id.indexOf("ceshi_") > -1)
idList += id.replace("ceshi_", '') + ',';
});
alert(idList);
} function consleclick() {
var node = $('#treeGrid').treegrid('expandAll', 2);
}
</script>
</head>
<body class="easyui-layout">
<table id="treeGrid" class="easyui-treegrid" style="width:700px;height:300px"></table>
<a id="consle" href="#">red</a>
</body>
</html>
此设置跟grid很相似了。
Easyui treegrid复选框设置的更多相关文章
- easyui datagrid复选框控制单选
使用easyui datagrid的时候,由于对数据表格操作太多,并且有单选和多选功能因此采用复选框.但是在单选的状态,使用CheckOnSelect和singleselect时发现,页面有明显延迟, ...
- C# easyui datagrid 复选框填充。
具体效果如下: 首页
- easyUI带复选框的组合树
代码: <input id="depts"><script type="text/javascript">$(document).rea ...
- EasyUI DataGrid 复选框
使用checkbox,用户可以选定/取消数据行.添加checkbox列,我们简单的添加列的checkbox属性,并且设置为true.代码像这样:<table id="tt"& ...
- Ext.grid.CheckboxSelectionModel复选框设置某行不可以选中
var sm = new Ext.grid.CheckboxSelectionModel({ renderer:function(v,c,r){ if(r.get("isEdit" ...
- EasyUI datagrid 复选框可以多选但不能全选功能实现
1.功能需求: 实现多选,但是不能够全选功能 2.js代码 //帮卖列表页面,可以多选但是不能够全选实现 $(".datagrid-header-check").children ...
- 设置checkbox不能选中,复选框不能选中
Web开发:设置复选框的只读效果 在Web开发中,有时候需要显示一些复选框(checkbox),表明这个地方是可以进行勾选操作的,但是有时候是只想告知用户"这个地方是可以进行勾选操作的&qu ...
- checkbox设置复选框的只读效果不让用户勾选
在Web开发中,有时候需要显示一些复选框(checkbox),表明这个地方是可以进行勾选操作的,但是有时候是只想告知用户"这个地方是可以进行勾选操作的"而不想让用户在此处勾选(比如 ...
- jQuery操作复选框的简单使用
开发中为了实现一个小功能,就是复选框的相互影响事件,如下图: 就是通过复选框设置权限,权限是分等级的,这是一个web管理系统的应用,一个管理员具有三个权限赋予,权限也是有等级的,其中删除和编辑权限相当 ...
随机推荐
- js 环形链表
function link($no){ this.no = $no; this.next;}function addLink($num){ var $first=$cur = {} ...
- bzoj1630 [Usaco2007 Demo]Ant Counting
Description Bessie was poking around the ant hill one day watching the ants march to and fro while g ...
- hdu1556 Color the ball
#include <iostream> #include <cstdio> #include <cstring> #include <algorithm> ...
- grep, egrep, fgrep笔记
grep, egrep, fgrep grep: 根据模式搜索文本,并将符合模式的文本行显示出来.Pattern: 文本字符和正则表达式的元字符组合而成匹配条件 grep [options] PATT ...
- Base64编码和解码算法
Base64么新鲜的算法了.只是假设你没从事过页面开发(或者说动态页面开发.尤其是邮箱服务),你都不怎么了解过,仅仅是听起来非常熟悉. 对于黑客来说,Base64与MD5算法有着相同的位置.由于电子邮 ...
- C# 零散笔记
关于控件 控件实质就是一个类 属性中的Name就是它实例后的变量名 属性中的其他东西就是类中的变量或函数 例如: 可以直接通过Name.BackColor=Color.Yellow; 来直接操作控件的 ...
- 【组合数学:第一类斯特林数】【HDU3625】Examining the Rooms
Examining the Rooms Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Othe ...
- Java使用默认浏览器打开指定URL
直接贴代码: 方法一: Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler http://www.baidu.co ...
- 查看IIS进程id
Windows 2003 cscript C:\windows\system32\iisapp.vbs -a Windows 2008 C:\windows\system32\inetsrv\appc ...
- 用 alias 给常用命令取个别名
作为一名iOS开发者,很多时候需要用到命令行,有时候一长串的命令实在让人讨厌,特别是一些常用的命令,我们要一遍一遍不厌其烦的去敲键盘.但是老鸟一般都不会这么傻,因为有 alias,通过alias 我们 ...