Part 1) In my grid, I have some editable columns which I would like to do inline editing to. However when I select any particular cell and if the inline editing is available on that cell (editable: true
), it should select the text to be edited.
For example if this is the default grid: then upon selecting any cell in Quantity, the result should be something like this:
When we click on a cell to edit that row in jqGrid, current implementation does not highlight the selected text like this. Is there any way to achieve this?
Part 2) Migrated to this question as per Oleg's suggestion
GRID CODE: jsFiddle
Note: My real application datatype is JSON
I'm not sure about all versions of old web browsers, but you can modify the code of
onSelectRow
to the followingsee http://jsfiddle.net/OlegKi/HJema/163/. It uses
focusField: 'Quantity'
option to set the focus on the'Quantity'
column. It uses select() method to select the text of<input>
field.The second part of your question (about
bindKeys
) seems to me a separate question. The methodbindKeys
allows to implement custom callbacksonLeftKey
,onRightKey
. Which one you would like better to use is not full clear for me.