www.gusucode.com > 一个基于extjs的强大聊天插件源码程序 > 一个基于extjs的强大聊天插件/extjame/ext-jame/js/ext2/examples/tree/column-tree.js
/* * Ext JS Library 2.0.2 * Copyright(c) 2006-2008, Ext JS, LLC. * licensing@extjs.com * * http://extjs.com/license */ Ext.onReady(function(){ var tree = new Ext.tree.ColumnTree({ el:'tree-ct', width:552, autoHeight:true, rootVisible:false, autoScroll:true, title: 'Example Tasks', columns:[{ header:'Task', width:350, dataIndex:'task' },{ header:'Duration', width:100, dataIndex:'duration' },{ header:'Assigned To', width:100, dataIndex:'user' }], loader: new Ext.tree.TreeLoader({ dataUrl:'column-data.json', uiProviders:{ 'col': Ext.tree.ColumnNodeUI } }), root: new Ext.tree.AsyncTreeNode({ text:'Tasks' }) }); tree.render(); });