Home › Forums › Guriddo jqGrid JS › Help › Keyboard navigation/selection in jqGrid not working
I'm having the same problem. I'm using jqgrid 3.8, with the cell editing plugin, and I've set cellEdit to true, and set the column models editable property to false, as the advice suggests, and I can't get a row to be selected using the keyboard.
This is critical for us for accessibility reasons. Does anyone have any suggestions?
Regards,
Nathan Messer
I am another person with the same problem. I have some other requirements too.
The grid has virtually 250,000 rows, so I use virtual scrolling. I want to be able to [Tab] into the grid from the previous part of the form, selecting the first visible row at the same time, use up and down arrow keys to move up and down, and [Enter] to have the same effect as a mouse click (not all rows respond to clicks or [Enter]. The user does not do any editing.
I do not believe the complicated messes I have made trying to do this are close to the correct method.
Hello,
I think that the problem is that yopu do not have read docs and
I have read the documentation, but I found a lot of it difficult to understand. Like RickB, I can use up and down arrows to scroll the view of the grid, but cannot change the current selection. There is no mention in the documentation about controlling form focus either into the grid or within it (if I want the grid to take focus so that I can use keystrokes to change which row is selected using the arrow keys, what do I trigger the “focus” event on? How do I control which row is selected when I do? What if I am using virtual scrolling (and I am) and the row to be selected isn't loaded?).
I am going to try doing this again. But I don't want to make another mess of it, so let me check if I have this right.
Would this be doing things the right way? But now I don't understand how to make clicking on a row have the same behaviour as selecting it with the keyboard and hitting [Enter]. There seems to be no kind of setting a row's “click” handler (except through accessing the DOM object – which I could not find support for).
I still can't get the focus from the rest of the form into the grid even if the grid contains a selected row.
If I use an event handler on the previous form element's [Tab] key to manually put the focus on the
In fact, grid tries to reloads twice: first it reloads the first page and then it reloads the page it is supposed to. If the focus was on the row, then it gets lost (because the row was destroyed and replaced with a new one during the reload).
I wonder if this is related. I have already had to add a handler to the gridComplete event that sniffs out the selected row and uses scrollTop() to reposition the grid manually, so if the grid is scrolling to the top whenever I try to shift the selection, and then I'm resetting the scroll position, that would explain the two loads. Of course there shouldn't be any.
This keyboard inaccessibility is turning into a showstopper.
Update. By setting “scrollingRows:false” when calling bindKeys() (and osome ther random prodding), Keyboard focus is successful, the spontaneous reloading has stopped, and the up and down arrow keys do what they should. Woohoo!
All I need to do now is find out why the grid only scrolls by 15px per row when the height of a row is 22px, and I'll be totally satisfied.
Updated update: except now the grid won't scroll when using the mouse to move the scrollbar.
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top