EasyUI treegrid  加载checked

  $(function () {
$('#tbDictContTree').treegrid({
title: '数据字典目录管理',
iconCls: 'icon-ok',
//width: 700,
//height: 500,
fit: true, ////自动大小
rownumbers: true, //添加一列来显示行号
animate: true,
striped: true, //True 奇偶行使用不同背景色
collapsible: true,
//checkbox: true,
fitColumns: true,
url: '/ashx/Systems/tbDictContTree.ashx',
idField: 'pid',
treeField: 'sn',
// collapse: false,
// collapseAll: true,
//SELECT PID as pid, FID, SN as sn, Name as name, CanUse, Memo
columns: [[
//{ field: 'ck', checkbox: true }, //第一列显示选择
{ title: '编号', field: 'sn', width: },
{ title: '名称', field: 'name', width: },
// { title: '是否使用', field: 'canuse1', width: 180 },
{title: '是否使用', field: 'canuse', width: , align: 'center', formatter: function (value, row, index) {
if (row.canuse == "True") {
// return '<input type="checkbox" name="canuse" checked="checked">';
return '<img src="/images/checkmark.gif">';
}
else {
// return '<input type="checkbox" name="canuse" >';
return '<img src="/images/checknomark.gif">';
}
}
}, { title: '备注', field: 'memo', width: }
]],
queryParams: { "action": "query"} //传输参数
});
});
    function edit_dg1() {
//选中一行,获取这一行的属性的值
var node = $('#tbDictContTree').treegrid('getSelected');
//判断是否选中
if (node != null) {
$("#textpid").val(node.pid);
$("#textsn").val(node.sn);
$("#textname").val(node.name);
// $("#textcanuse").val(node.canuse);
if (node.canuse == "True")
$('#textcanuse').attr('checked',true); //checked;unchecked
else
$('#textcanuse').attr('checked', false);
$("#textmemo").val(node.memo);
$("#dd2").show(); //显示修改窗体

最新文章

  1. Jetty安装
  2. textfield设置左边距
  3. C语言 百炼成钢19
  4. Django 的css和js压缩插件:django_compressor
  5. wpa_supplicant 连接成功后,如何配置wlan0与br0 协调上网
  6. SQL Where语句中AND与OR的计算次序 .
  7. 关于asp.net中cookie在调试过程中读写正常发布后乱码问题
  8. mysql自动备份
  9. C++——STL中三种顺序容器的简要差别
  10. html5中的meta标签
  11. python中的赋值和深浅拷贝
  12. dubbo的架构
  13. 排序分析函数中对null的处理
  14. UNIX环境高级编程——标准I/O库函数和Unbuffered I/O函数
  15. LeetCode Javascript实现 258. Add Digits 104. Maximum Depth of Binary Tree 226. Invert Binary Tree
  16. 使用Skaffold一键将项目发布到Kubernetes
  17. Codeforces Round #503 (by SIS, Div. 2)
  18. oracle 查看删除重复数据
  19. 两个onCreate方法?你真的了解onCreate()么?
  20. 记录pytorch的几个问题

热门文章

  1. JNI_Z_09_Java的字符串
  2. git常用操作 配置用户信息、拉取项目、提交代码、分支操作、版本回退...
  3. 【C#基本功 控件的用法】 委托
  4. cmd 导出 SQLite数据库
  5. MapReduce程序——WordCount(Windows_Eclipse + Ubuntu14.04_Hadoop2.9.0)
  6. 【Demo】HTML5拖放--简单demo
  7. hdu 5978 To begin or not to begin(概率,找规律)
  8. MacOS Docker安装
  9. java jprofile
  10. 【sparkSQL】DataFrame的常用操作