Select / Focus cell using SlickGrid

2019-07-21 08:53发布

How can I set the focus (or at least highlight) to a specific cell using SlickGrid, given that I have cell and row number?

Use case behind is that I have a grid which creates an ajax call each time the user changes something in the cell. Ideally the user should not recognize that the data has been send to the server. For the case that the data could not be saved at the server, the client gets informed via a callback and there I want to set the focus to the cell for which the values could not have been saved.

2条回答
倾城 Initia
2楼-- · 2019-07-21 09:01

grid.gotoCell() worked for me better, as grid.setActiveCell() wasn't setting the field to an editable state.

查看更多
孤傲高冷的网名
3楼-- · 2019-07-21 09:24

grid.setActiveCell() and grid.focus()

查看更多
登录 后发表回答