PDA

View Full Version : use rowexpander and cellediting



heartneo
16 Aug 2012, 6:42 PM
hello, everyone.I want to use rowexpander and cellediting in the same time, they are run, but browser has a error:"SCRIPT438: Object doesn't support property or method 'getEditor' ", I know the error is when use rowexpander the cellediting also work, but I do not know how to solution it, I mean when use the rowexpander how to let the cellediting stop working,then I think the error will disapper.


plugins: [
{
ptype: 'cellediting',
clicksToEdit: 1
},
{
ptype: 'rowexpander',
rowBodyTpl : [
'<p><b>content:</b> {content}</p>'
]
}
]

Thanks in advance!

scottmartin
7 Sep 2012, 12:58 PM
See if this post will help: (#5 and #6 for CSS)
http://www.sencha.com/forum/showthread.php?237681/

Scott.

vietits
7 Sep 2012, 5:52 PM
FYI: The following example works fine with Ext 4.1.1 on Chrome & Firefox.


Ext.require([
'Ext.*',
'Ext.ux.RowExpander'
]);


Ext.onReady(function(){
var store = Ext.create('Ext.data.Store', {
fields: ['field1', 'field2'],
data: [{
field1: 'value1.1', field2: 'value1.2'
},{
field1: 'value2.1', field2: 'value2.2'
}]
});


var grid = Ext.create('Ext.grid.Panel', {
store: store,
height: 350,
width: 600,
title: 'Demo',
renderTo: Ext.getBody(),
plugins : [{
ptype: 'cellediting',
clicksToEdit : 1
},{
ptype: 'rowexpander',
rowBodyTpl : [
'<p><b>content:</b> {content}</p>'
]
}],
columns: [{
text : 'Field 1',
flex : 1,
dataIndex: 'field1',
editor : 'textfield'
},{
text : 'Field 2',
flex : 1,
dataIndex: 'field2',
editor : 'textfield'
}]
});
});