When you click on another record in the grid and the data that is not saved in the previous line, a warning is thrown: switch to save or return and save. Can you please tell me how to implement a return to the previous modified line?

... grid.addRowClickHandler(new RowClickEvent.RowClickHandler() { @Override public void onRowClick( RowClickEvent rowClickEvent) { if (isSave) { Callback<Void> yesCallback= new Callback<Void>() { @Override public void success(Void obj) { fxSpotRateOverrideGrid.getWidget().getStore().clear(); add.setEnabled(false); saveButton.setEnabled(false); isSave =false; } }; Callback<Void> noCallback= new Callback<Void>() { @Override public void success(Void obj) { ??? } }; UIUtils.confirmationOkCancelMessage(msgs.rateOverrideNotSaved(), yesCallback, noCallback); } else { fxSpotRateOverrideGrid.getWidget().getStore().clear(); } } }); 

Tried grid.getSelectionModel().selectPrevious(true) but returning to the line above and not the previous one.

    0