Saturday, September 5, 2015

Removing row from datagrid changes scrollbar position to the top

Hello,

I got a problem removing a row from datagrid. Whenever I remove one row and update the provider, the scrollposition of the grid is set to the top.
This is caused by the keyboard selected row, that gets set to the first row after updating the data.
So I disabled the datagrids keyboard selection.
grid.setKeyboardSelectionPolicy(KeyboardSelectionPolicy.DISABLED);

With KeyboardSelectionPolicy.DISABLED, the scrollposition works fine. BUT now I dont receive any keyDown Events any more..

I added the handler the following way:
   public HandlerRegistration addKeyDownHandler(KeyDownHandler handler) {
      return grid.addDomHandler(handler, KeyDownEvent.getType());
   }

It looks like the grid is prevents any further propagation of the keyevents :/

I already found a post but without a solution:
https://groups.google.com/forum/#!topic/google-web-toolkit-contributors/0AQp0CGwEXE


Anyone know, how to handle this problem?

Thanks in advance.
Regards,
Manuel

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment