Keyboard selection behavior in the Grid

Thanks a lot! It works perfectly. Wasn’t so happy with my Javascript solution because you need to check in a specific intervall.
To solve the deselect problem that Marius mentioned i check first if the focused row is allready selected.
I also had some troubles because i have two Grids on my page. To solve this, i set a unique class name for every grid and pass them to execClick using grid.getStyleName().

I’ll just write it here in case anyone else has the same problem.
Thanks for helping

 public static native void execClick(String class)  /*-{
​   // Replace ' ' because getStyleName returns ' ' instead of '.'
    var id = "."+class.replace(/ /g, ".");    
    if(!$wnd.$(id+" .v-grid-row-focused.v-grid-row-selected").length)
    {    
      $wnd.$(id+" .v-grid-body .v-grid-cell-focused").click();
    }

Hi! I implemented successfully your solution. I have a problem though, it works very well when going down, but there is something strange when going up when there is a scroll bar: it works well to go up until the next element is not visible (because of the scroll), so instead of selecting the previous elemnt, it just moves the scroll.
I am not very good with javascript but I guess it’s something that could be solved in that last piece of javascript code.
Any suggestion?

Thanks for your help

I’m also interested in this feature to immediately select the row when the user navigates up or down. Is there a way with Vaadin 8 now?

I’m interested too.

There is an [GridFastNavigation Add-on ]
(https://vaadin.com/directory/component/gridfastnavigation-add-on).

Is there a way with Vaadin 14 now?