I have a editable grid (Ext.grid.plugin.RowEditing
)
The grid is with in a form. The form is shown in a window
As the form is shown by showing the window, i want to focus on the first editable row's first column.
This is the method called for window's 'show' event
onWinShow : function (window, options) {
var grid = this.down ('#myGrid');
// focus on first field
var rowEditStore = grid.getStore ();
var rowEditor = grid.getPlugin ('rowEditplugin');
rowEditor.cancelEdit ();
var r = rowEditStore.getAt (0);
rowEditor.startEdit (r, 1);
},
I checked the source of RowEditing
and RowEditor
which has the logic for focusing the field.
I can see the focus appearing for a moment and then vanishing, No field in the form is focused after that.
Please suggest where have i gone wrong.
Thanks