PDA

View Full Version : setting focus to a GridPanel



funz51
25 Aug 2010, 9:40 AM
I can't seem to be able to set focus to a row in a gridPanel. I have tried ...gridPanel.getView().focusRow(1) but it does not seem to do anything. I am programming 508 compliancy and need to be able to set focus to the gridPanel, then use only the keyboard. I can use the arrow keys to traverse the list if I set focus manually with the mouse first.

thanks in advance.

Animal
25 Aug 2010, 10:07 AM
Obviously there has to be some rows in the grid for you to focus the second row as you seem to require.

funz51
25 Aug 2010, 11:00 AM
yes, of course, there are a bunch of rows.

these dudes have similar issues:

http://www.sencha.com/forum/showthread.php?16940-SOLVED-Keymapped-event-continues-to-bubble-despite-stopEvent-true&p=81310

Animal
25 Aug 2010, 12:16 PM
When you set a breakpoint at that line, are there rows there?

Because how do you time the execution of that call?

funz51
30 Aug 2010, 5:52 AM
essentially, the question I have is why the selectionModel.selectRow() does not set the focus? How do I set the focus (for the use of just the up/down arrows) when I select the row this way?

Animal
30 Aug 2010, 6:09 AM
When you break there. When you set a breakpoint at that line, and look are there any rows?

Or do you have to wait until there are rows there to select the second one as you require?

Do you have to wait until the rows are rendered before selecting the second row?

heratech
30 Aug 2010, 10:23 AM
are you trying to focus the rows in some kind of callback method (when the rows are definitely loaded)?

funz51
3 Sep 2010, 6:36 AM
i am having the exact same issue as this post. please view:

http://www.sencha.com/forum/showthread.php?17725-Setting-focus-to-grid