标签:scroll creat maxheight ash listener var spl dex 点击事件
1. treeStore的C#类对象
public class ExtTreeNode { string id; string text; string icon; string url; bool leaf; bool expanded; List<ExtTreeNode> children = new List<ExtTreeNode>(); }
2. Ext.tree
Ext.onReady(function () { //數據源 var store = Ext.create(‘Ext.data.TreeStore‘, { proxy: { type: ‘ajax‘, url: ‘../API/bbs/Default.ashx?API=menu‘ } }); //树形配置 treePanel = Ext.create(‘Ext.tree.Panel‘, { id: "TreeMenu", renderTo: ‘basicTree‘, width: 300, store: store, minSize: 150, maxHeight:‘100%;‘, autoScroll: true, rootVisible: false, singleExpand: false, collapsible: false, lines: true, split: true, listeners: { //鼠标右键 itemcontextmenu: function (node, record, items, index, e) { var nodemenu = Ext.create(‘Ext.menu.Menu‘, {items: [{text: ‘權限管理‘,handler: function () {}},{text: ‘增加子節點‘,handler: function () { }}]}); //取得鼠标点击坐标,展示菜单 nodemenu.showAt(e.getXY()); }, //鼠标单击 itemclick: function (node, record, index, e) {}, //鼠标双击 itemdblclick:function(){} } }); });
标签:scroll creat maxheight ash listener var spl dex 点击事件
原文地址:https://www.cnblogs.com/2625664742-chanyk/p/13176470.html