Navigation key

I have a grid panel used to search for elements. It starts empty, but it configured to load when the user launches a nearby search field.

I use grid.getSelectionModel().select(0)to select the first line when loading it. But this does not allow you to enable navigation using the arrow keys. If I do mousedown on a line, then the arrow will work.

I would just like to automatically select the first entry and enable arrow key navigation.

I tried to focus on the grid, gridview, as well as the first line with grid.view.focusRow(0), and I tried all this before and after the call select(0). None of them give me key navigation. Any ideas?

It uses 4.1b2

+3
source share
1

ExtJs4 . :

Ext.FocusManager.enable({focusFrame: true});

Ext, , . , , , .

grid.getView().focus();
grid.getSelectionModel().select(0);

p.s. , 0 .

+3

All Articles