Select / Focus cell using SlickGrid

偶尔善良 提交于 2019-12-11 02:25:20

问题


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.


回答1:


grid.setActiveCell() and grid.focus()




回答2:


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



来源:https://stackoverflow.com/questions/12842946/select-focus-cell-using-slickgrid

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