I have a grid which has a column with editor defined like below.
this.accrualGrid = new Ext.grid.GridPanel({
store: store,
id:'accrualGrid_add',
plugins :[this.cellEditing],
columns: [
{header: 'Milestone Description', width: 340, dataIndex: 'Description',
getEditor: function(record) {
if(Ext.getCmp('accrualGrid_add').store.indexOf(record)==0)
{
return Ext.create('Ext.grid.CellEditor', {
field: Ext.create('Ext.form.field.Text', {
id:'MDesc_Add',
validator:function(val){
if(val=="")
return false;
else
return true;
},
})
});
}
}
}]
Everytime the grid the loaded, I am not able the access the textfield inside editor until we click on that cell.
Ext.getCmp('MDesc_Add') gives undefined value.
After I click on that cell, It gives me the textfield object.
How can I access the textfield object just on grid load or set data of grid??