`
旭少版
  • 浏览: 83191 次
  • 性别: Icon_minigender_1
  • 来自: 南宁
社区版块
存档分类
最新评论

jeecg随笔 -- combotree只选择叶子节点

阅读更多

editor : {
						type : 'combotree',
						options : {
							url : '***********Action!ctrlTree.action',
							animate : false,
							lines : !sy.isLessThanIe8(),
							onLoadSuccess : function(row, data) {
								var t = $(this);
								if (data) {
									$(data).each(function(index, d) {
										if (this.state == 'closed') {
											t.tree('expandAll');
										}
									});
								}
							},
							onBeforeSelect : function(node){
								var t = $(this).tree;
								var isLeaf = t('isLeaf', node.target);
								if (!isLeaf) {//选择的不是叶子节点
									return false;
								}
							}
						}
					}



在datagrid里的编辑模式下,限制 combotree 只能选择叶子节点的方式

--------------------------------------
在多选模式下,初始化 combotree ,只允许选择 叶子节点的话
可以使用
onlyLeafCheck : true 属性
即: 只在叶子节点出现 checkbox 框

参考文章链接:
http://blog.csdn.net/educast/article/details/7659496
分享到:
评论
1 楼 无赖二号 2013-09-23  
You are great!

相关推荐

Global site tag (gtag.js) - Google Analytics