Ext.grid.column

    //配置表格列  
    {header: "姓名", width: 50, dataIndex: 'name'},  
    {header: "组长", width: 50, dataIndex: 'leader',   
        xtype: 'booleancolumn',//Ext.grid.column.Boolean布尔列  
        trueText: '是',  
        falseText: '否'  
    },  
    {header: "生日", width: 100, dataIndex: 'birthday',   
        xtype : 'datecolumn',//Ext.grid.column.Date日期列  
        format : 'Y年m月d日'//日期格式化字符串  
    },  
    {header: "薪资", width: 50, dataIndex: 'salary',   
        xtype: 'numbercolumn',//Ext.grid.column.Number数字列  
        format:'0,000'//数字格式化字符串  
    }  

 

actioncolumn

xtype: 'actioncolumn',//Ext.grid.column.Action动作列   
items: [{   
    icon: 'images/edit.gif',//指定编辑图标资源的URL    
    handler: function(grid, rowIndex, colIndex) {   
        //获取被操作的数据记录   
        var rec = grid.getStore().getAt(rowIndex);   
        alert("编辑 " + rec.get('name'));   
    }   
}]

templatecolumn

    {  
        header: "描述", width: 100,  
        xtype: 'templatecolumn',//Ext.grid.column.Template数字列  
        tpl : '{name}<tpl if="leader == false">不</tpl>是组长'  
    }  

 

上一篇:转载python描述符介绍


下一篇:python 向上取整ceil 向下取整floor 四舍五入round