Use Keys extension to move to next editable cell
Use Keys extension to move to next editable cell
![nsscott](https://secure.gravatar.com/avatar/980a08402941be6fb3931939d53bd655/?default=https%3A%2F%2Fvanillicon.com%2F980a08402941be6fb3931939d53bd655_200.png&rating=g&size=120)
I am using the latest version of datatables with the Keys extension with an inline editor.
My table rows contains a mix of editable and non-editable cells. We want clicking the arrow and tab keys to skip over the non-editable to the next editable cell. Below illustrates what we want but we are at loss to make it happen.
This discussion has been closed.
Answers
Hi @nsscott ,
You can use a selector to specify those columns not to allow inline editing with, like this.
Cheers,
Colin
Thanks for the reply Colin.
I should have called out that the columns which support input change on a row by row basis. The example is useful if the same columns support input across all rows.
Any thoughts on how to deal with that?
That won't be possible, I'm afraid, since it's purely on a column basis.
C
There are no other options?
I tried capturing the the key-focus event to determine what key the user had pressed via the OrignalEvent parameter and use the keys.move method to navigate appropriately but did not manage to get this to work.
Could I set the column selector you mention above but reset the columns appropriately when the user moves to another row?
I think the only option would be to use
key-focus
as you mentioned and use that to run whatever custom logic you have for determining if the focus should be moved on or not.Perhaps you can show me the code you used and didn't work? Also, were you using the nightly version of KeyTable. I think I might have deployed the keys.move() method document a bit early - you need the latest version for it.
Allan