Implement keyboard control in JavaScript Grid
Posted
by Vanco
on Stack Overflow
See other posts from Stack Overflow
or by Vanco
Published on 2010-04-16T19:46:26Z
Indexed on
2010/04/18
8:13 UTC
Read the original article
Hit count: 305
I finished building a JavaScript grid control, end everything works fine. Paging, button navigation, column sorting, etc.
The cells in the grid are DIVs which are generated using Mootools 1.2.4 (which is heavily used throughout the control).
I want to implement keyboard control for the grid, both for paging (page up/page down) and for moving with arrow keys inside the rows/cells of the grid. I think that I have to attach an event handler on each cell of the grid and detect what key is being pressed in order to take an appropriate action. But, I can't set the focus on the cells.
What am I missing? How do I do this? Any help is appreciated.
© Stack Overflow or respective owner