if(!Ext.grid.GridView.prototype.templates)
{
Ext.grid.GridView.prototype.templates = {};
}
Ext.grid.GridView.prototype.templates.cell = new Ext.Template(
'<td class="x-grid3-col x-grid3-cell x-grid3-td-{id} x-selectable {css}" style="{style}" tabIndex="0" {cellAttr}>',
'<div class="x-grid3-cell-inner x-grid3-col-{id}" {attr}>{value}</div>',
'</td>');
必须放到onready外面,而且是文件的最下面

本文介绍如何为Ext Grid View中的单元格定义自定义模板。通过修改Ext Grid View原型中的templates属性,可以实现对表格中每个单元格样式的个性化设置。
1万+

被折叠的 条评论
为什么被折叠?



