column-tree.js
989 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/*
* Ext JS Library 2.1
* 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();
});