PDA

View Full Version : Widget in Grid Cell



ArcticSun
3 Nov 2011, 1:09 AM
Hello,
I use gridPanel and create in it`s cells some widgets like formFields - ckeckbox, combobox and numberField


columns: [
{
text : 'someText',
width : 100,
height : 60,
sortable : false,
dataIndex: 'someDataIndex',
renderer: function(value) {
var id = Ext.id();
Ext.Function.defer(function() {
new Ext.form.field.Checkbox({
boxLabel: false,
name: 'someName',
inputValue: '1',
width: 50,
renderTo: id,
checked: (value == 2)
});
}, 100);
return '<div id="' + id + '"></div>';
}
}
]
So, when grid shows I get an error "el is null":
if (el.insertAdjacentHTML) {

How can I fix this?

redraid
3 Nov 2011, 2:06 AM
Try this plugin http://www.sencha.com/forum/showthread.php?148064-Component-Column-Components-in-Grid-Cells&highlight=grid