PDA

View Full Version : [4.2.1] Grid rowexpander with textfield inside



andreas-spindler
28 Jul 2014, 10:56 PM
Hi everyone,

I'm facing a problem, where I need to put several textfields inside the rowexpanders body. But, I cannot set the cursor inside the textfield. Everything it does is (de)selecting the grid row, and if I turn off the selection in general (that is no option at all) it still does not focus the text field.

Does anyone have an idea how to solve this?

This is how I create the textfields.


plugins: [
Ext.create('Ext.grid.plugin.CellEditing', {
pluginId: 'cellEdit',
triggerEvent: 'celldblclick'
}),
Ext.create('Ext.grid.plugin.RowExpander', {
pluginId: 'rowExpander',
rowBodyTpl : new Ext.XTemplate('<div id="timings-expd-{muobId}"></div>'),
toggleRow: function(rowIdx,record) {

//do some magic stuff

var container = Ext.create('Ext.form.Panel', {
row: row,
layout: 'hbox',
items: [{
xtype: 'textfield',
fieldLable: 'test'
}]
});

rowNode.container = container;

container.render(targetId);
//and some more magic stuff
}
})
]

Thank you!

slemmon
1 Aug 2014, 2:06 PM
Hi,

Though it may be possible to inject components into grid cells / rows it's not supported in ExtJS 4.
Components in grid cells is supported in ExtJS 5, but 5 still supports only Ext.XTemplate / HTML presently.