Extjs gridpanel的单元格的数据怎么居中显示?

Extjs gridpanel的单元格的数据怎么居中显示?

1个回答

In both examples above, the ability to apply a CSS class to all cells in a column (including the header) is demonstrated through the use of the id config option. This column could be styled by including the following css:

.x-grid3-td-company {
color: red; // entire column will have red font
}
摘自Ext的官方API Class:Ext.grid.ColumnModel
其实就是根据ID添加个样式
.x-grid3-td-{列ID}{
text-align: center; //文字居中
}

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!