ext tree 可编辑插件

jsp导入插件:

<script type="text/javascript" src="<%=request.getContextPath()%>/extjs/TreeCellEditing.js"></script>

 插件下载地址:http://pan.baidu.com/share/link?shareid=549799148&uk=2368039448

tree pannel代码:

var tree = Ext.create('Ext.tree.Panel', {
		title: '动态加载节点的树',
		// 不使用Vista风格的箭头代表节点的展开/折叠状态
		useArrows: false,
		width: 800,
		height: 550,
		store: treeStore, // 指定该树所使用的TreeStore
		rootVisible: false, // 指定根节点不可见

		multiSelect:true,
		viewConfig: {
			plugins: {
				ptype: 'treeviewdragdrop',
			}
		},//这个是拽拉的插件,可以不用理会	
                columns:[
		 		{
		 			xtype:'treecolumn',
		 			text:'text',
		 			writh:250,
		 			dataIndex:'text',
		 			field: 'textfield'
		 		},{
		 			text:'info',
		 			dataIndex:'id',
		 			field: 'textfield'
		 		},{
		 			text:'info',
		 			dataIndex:'desc',
		 			field: 'textfield'
		 		}
		],
	    selType: 'cellmodel',
        plugins: [
             Ext.create('Ext.grid.plugin.CellEditing', {
                 clicksToEdit: 2,
                 listeners: {
                	 'beforeedit':function(editor,e,eOpts ){
                		 Ext.MessageBox.alert("hello word",e.record.id);
                	 }
                 }

             })
        ],
		renderTo: Ext.getBody()
	});

 

 

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值