jqGrid - how to focus cell inline editing

一世执手 提交于 2020-01-06 02:41:30

问题


I found many solutions, but neither doesn't work. I have the latest version 4.7.0. In example this: focus cell inline editing.

My solution is [code is in coffeescript]:

ondblClickRow: (rowId, iRow, iCol, e) ->
        if rowId and rowId isnt lastSelectedRowId
            table.jqGrid 'editRow', rowId, true
            $("input, select, textarea", e.target).focus()
            lastSelectedRowId = rowId

Doesn't jqGrid have impelemented how to select of cell during inline editing?

Note for Oleg: Please, look at my last comment again jqgrid (converting datatypes)


回答1:


I found the best solution, but only for 4.7.0. version.

coffeescript code, but solution is to see.

ondblClickRow: (rowId, iRow, iCol, e) ->
    if rowId and rowId isnt lastSelectedRowId
        table.jqGrid 'editRow', rowId, {keys:true, focusField: iCol}
        lastSelectedRowId = rowId


来源:https://stackoverflow.com/questions/27548985/jqgrid-how-to-focus-cell-inline-editing

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!