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?