Is it possible to keep the focus on the selected row even af

Is it possible to keep the focus on the selected row even after perfoming some operations. Suppose i click a button after selecting the row. The operation or the function gets executed and the control should return to the selected row so that after i click the button second time the same operation should be done (Note that i should not be selecting the row again)

I’m not sure which focus do you mean, it can be
a) Native html focus, it has sense only for such operation as tabbing
b) Inner selection focus of grid - this is not changed on any actions which not change selection in grid, so if you have selected row and click on any button outside the grid - nothing will change in grid selection.

In some complex cases you can save and restore selection in next manner

   var s=[grid.getSelectedId(),grid.getSelectedCellIndex()];
    … any code here …
    grid.selectCell(grid.getRowIndexs[0],s[1]);