PDA

View Full Version : StartEdit error "item is null"



jakobgrannas
5 Oct 2011, 6:48 AM
Hello,

I'm trying to make grid columns default to edit mode (meaning I don't want to click in order to edit content) and I'm trying to use the method startEdit in order to achieve this.

Here is (part of) my code:


renderer: function(value, metaData, record, rowIndex, colIndex, store, view) {
this.plugins[0].startEdit(record, view.getHeaderAtIndex(colIndex));
return record.data.day;
}

(I know this.plugins[0] works, so that's not the problem)

I include the editor plugin further down in my code, like so:


definePlugins: function() {
return [
Ext.create('Intelliplan.Base.Grid.Plugin.RowEditing', {
clicksToEdit: 1
})
];
}


The problem is I get an error message in Firebug saying "Item is null - item.on(ename, fn, scope, options);" and I honestly don't know what I'm doing wrong. It seems to me that startEdit should work when passed a record and a columnHeader...

Thanks in advance!