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
}
],
{ 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
}
],
相关文章推荐
- LaTeX技巧374:如何在指定列宽的表格里实现文字居中
- XE7下修改FMX.Grid.pas解决Grid列头与文本内容的样式设定,实现标题栏文字居中,内容的文本可右对齐。
- 实现DIV层内的文字垂直居中
- ASP.NET,Web界面利用Button来实现将telerik:RadGrid表格内数据导出Excel
- 使用css属性line-height实现文字垂直居中的问题
- ext4中实现动态grid生成
- RecyclerView利用GridLayoutManager实现少于span数量时候居中对齐
- vue组件实现文字居中对齐的方法
- devexpress表格gridcontrol实现列统计,总计,平均,求和等。
- devexpress表格控件gridcontrol图片列,按钮列,时间列等特殊列的实现
- 如何将Word表格内的文字居中对齐
- 实现DIV层内的文字垂直居中
- vertical-align:middle在表单,img与文字实现垂直居中问题
- DIV CSS字体居中实现DIV文字水平左右居中
- EasyUI中Grid标题居中方法(jquery实现方法)
- CSS实现同一行的图片和文字垂直居中对齐的方法
- DhtmlxGrid组件应用---结合Ajax实现对表格数据的无刷新操作
- 纯css实现文字及图片水平垂直居中
- css实现ie6以上文字高度未知垂直居中
- ng-grid实现表格