Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Select / Focus cell using SlickGrid

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.

like image 325
Thomas Kremmel Avatar asked Nov 24 '25 02:11

Thomas Kremmel


2 Answers

grid.setActiveCell() and grid.focus()

like image 141
Tin Avatar answered Nov 25 '25 16:11

Tin


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

like image 29
Roman Avatar answered Nov 25 '25 15:11

Roman