您的位置:首页 > 其它

Ext4 实现grid 表格文字居中

2013-10-16 10:30 337 查看
columns: [

{ text: '名称', dataIndex: 'name', flex: 1, align: 'center', style: "text-align:center;" },

{ text: '年龄', dataIndex: 'age', flex: 1, align: 'center', style: "text-align:center;" },

{ text: '电话', dataIndex: 'phone', flex: 1, align: 'center', style: "text-align:center;" }

]

align: 'center', 设置grid表格里面的文字对齐 style 设置表头样式

Ext 里面的写法

cellTpl: [

'<td role="gridcell" class="{tdCls}" {tdAttr} id="{[Ext.id()]}">',

'<div {unselectableAttr} class="' + Ext.baseCSSPrefix + 'grid-cell-inner {innerCls}"',

'style="text-align:{align};<tpl if="style">{style}</tpl>">{value}</div>',

'</td>', {

priority: 0

}

],
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: