PDA

View Full Version : [FIXED] [4.1.0PR] Editing with a row body: error "columnHeader is undefined"



zombeerose
14 Nov 2011, 1:08 PM
REQUIRED INFORMATION

Ext version tested:

Ext 4.1 rev 0
Browser versions tested against:

FF7 (firebug 1.8 installed)
DOCTYPE tested against:

Strict
Description:

Using the cell editor plugin with the rowwrap/rowbody features will cause an error if the user double clicks on the row body.
Steps to reproduce the problem:

Run the code.
Double click on the row body, such as "NAME: Lisa".
The result that was expected:

No error.
The result that occurs instead:

columnHeader is undefined
ext/src/grid/plugin/CellEditing.js
Line 190
Test Case:


Ext.create('Ext.data.Store', {
storeId:'simpleStore',
fields:[
{name:'id',type:'int'},
'name'
],
data:{'items':[
{"id":"1","name":"Lisa"},
{"id":"2","name":"Bart"},
{"id":"3","name":"Homer"},
{"id":"4","name":"Marge"}
]},
proxy: {
type: 'memory',
reader: {
type: 'json',
root: 'items'
}
}
});


Ext.create('Ext.grid.Panel', {
title: 'Simple Grid',
store: Ext.data.StoreManager.lookup('simpleStore'),
columns: [
{header: 'Id', dataIndex: 'id', hidden: true },
{header: 'Name', dataIndex: 'name', flex:1, editor: {xtype:'textfield'}}
],
features: [{
ftype: 'rowbody',
getAdditionalData: function(data,ids,record){
var o = Ext.grid.feature.RowBody.prototype.getAdditionalData.apply(this, arguments);

o.rowBody = [
'<table class="rowexpand-data">',
'<td>&nbsp;&nbsp;NAME: <b>',record.get('name'),'</b>, (double-click here)</td>',
'</table>'
].join('');

return o;
}
},{
ftype: 'rowwrap'
}],
plugins: [{
clicksToEdit: 2,
ptype: 'cellediting'
}],
height: 200,
width: 500,
renderTo: Ext.getBody()
});


HELPFUL INFORMATION

Additional CSS used:

only default ext-all.css
Operating System:

WinXP Pro

germanicus
18 Nov 2011, 1:40 PM
We think this is a bug. Just created ticket EXTJSIV-4515 in our tracker.