Upgrade to ExtJS 3.3.1 - Released 11/30/2010
[extjs.git] / examples / docs / source / TreeGridColumns.html
1 <html>
2 <head>
3   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />    
4   <title>The source code</title>
5     <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
6     <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
7 </head>
8 <body  onload="prettyPrint();">
9     <pre class="prettyprint lang-js">/*!
10  * Ext JS Library 3.3.1
11  * Copyright(c) 2006-2010 Sencha Inc.
12  * licensing@sencha.com
13  * http://www.sencha.com/license
14  */
15 (function() {
16     Ext.override(Ext.list.Column, {
17         init : function() {    
18             var types = Ext.data.Types,
19                 st = this.sortType;
20                     
21             if(this.type){
22                 if(Ext.isString(this.type)){
23                     this.type = Ext.data.Types[this.type.toUpperCase()] || types.AUTO;
24                 }
25             }else{
26                 this.type = types.AUTO;
27             }
28
29             // named sortTypes are supported, here we look them up
30             if(Ext.isString(st)){
31                 this.sortType = Ext.data.SortTypes[st];
32             }else if(Ext.isEmpty(st)){
33                 this.sortType = this.type.sortType;
34             }
35         }
36     });
37
38     Ext.tree.Column = Ext.extend(Ext.list.Column, {});
39     Ext.tree.NumberColumn = Ext.extend(Ext.list.NumberColumn, {});
40     Ext.tree.DateColumn = Ext.extend(Ext.list.DateColumn, {});
41     Ext.tree.BooleanColumn = Ext.extend(Ext.list.BooleanColumn, {});
42
43     Ext.reg('tgcolumn', Ext.tree.Column);
44     Ext.reg('tgnumbercolumn', Ext.tree.NumberColumn);
45     Ext.reg('tgdatecolumn', Ext.tree.DateColumn);
46     Ext.reg('tgbooleancolumn', Ext.tree.BooleanColumn);
47 })();
48 </pre>    
49 </body>
50 </html>