- var mytree = new Ext.tree.TreePanel({
- id: 'ppdTree',
- x: 5,
- y: 5,
- width: 378,
- height: 470,
- useArrows: true,
- autoScroll: true,
- animate: true,
- enableDD: true,
- containerScroll: true,
- store: new Ext.data.TreeStore
- ({
- proxy:
- {
- type: 'ajax',
- url: 'data/User/UserPopedom.aspx?parameter=ppdTree&userId=' + userId
- },
- root:
- {
- id: 0,
- text: "选择权限",
- leaf: false,
- expandable: true,
- expanded: true
- },
- sorters: [
- {
- property: 'leaf',
- direction: 'ASC'
- },
- {
- property: 'text',
- direction: 'ASC'
- }]
- })
- });
- mytree.on('checkchange', function (node, checked) {
- node.expand();
- node.checked = checked;
- node.eachChild(function (child) {
- child.set('checked', checked);
- child.fireEvent('checkchange', child, checked);
- });
- }, mytree);

ExtJs4.0 TreePanel+CheckBox全选
最新推荐文章于 2025-12-29 12:46:58 发布
本文介绍了一个使用ExtJS框架创建树形面板的具体实例。该示例详细展示了如何通过配置属性来实现一个具有动态加载、排序及拖放功能的树形组件,并提供了具体的JavaScript代码。

5436

被折叠的 条评论
为什么被折叠?



