textcell用于显示纯文本内容,不会从column继承renderer、tpl和formatter
gridcell是grid的默认cell类型
源码
代码语言:javascript
复制Ext.define('Ext.grid.cell.Cell', {
extend: 'Ext.grid.cell.Text',
xtype: 'gridcell',
...
// 与column关联时继承renderer、tpl和formatter
updateColumn: function(column, oldColumn) {
...
if (column) {
tpl = column.getTpl();
renderer = column.getRenderer();
formatter = column.getFormatter();
if (renderer !== null) {
me.setRenderer(renderer);
friendly = (typeof renderer === 'function') && renderer.length === 1;
}
if (tpl !== null) {
me.setTpl(tpl);
friendly = false;
}
if (formatter !== null) {
me.setFormatter(formatter);
}
me.friendly = friendly;
}
};
...