harman
6 Sep 2012, 12:54 AM
Hi All,
I am defining an ExtJS 4.0.7 component to use it as an editor for a grid cell as follows
Ext.define('My.pickerField',{
extend:'Ext.form.field.Picker',
alias: ['widget.customPicker'],
width:155,
editable:false,
value: gridStore.getAt(rowIndex).get('somefield'),
createPicker: function() {
return Ext.create('Ext.panel.Panel', {
//....
//....
});
}
});
//Column where editor is placed
{
text: "Header",
dataIndex: 'field1',
width:158,
align : 'center',
sortable: true,
editor: {
xtype: 'customPicker'
}
}
Now the problem is to pass the grid store and row index to the xtype.
How can i do that?
May be i am doing it with wrong approach.
If so how do i use a custom editor ?
Thanks in advance.
I am defining an ExtJS 4.0.7 component to use it as an editor for a grid cell as follows
Ext.define('My.pickerField',{
extend:'Ext.form.field.Picker',
alias: ['widget.customPicker'],
width:155,
editable:false,
value: gridStore.getAt(rowIndex).get('somefield'),
createPicker: function() {
return Ext.create('Ext.panel.Panel', {
//....
//....
});
}
});
//Column where editor is placed
{
text: "Header",
dataIndex: 'field1',
width:158,
align : 'center',
sortable: true,
editor: {
xtype: 'customPicker'
}
}
Now the problem is to pass the grid store and row index to the xtype.
How can i do that?
May be i am doing it with wrong approach.
If so how do i use a custom editor ?
Thanks in advance.