3

I am using multiple row selection in vaadin 8 grid, I need an event that gives me the selected row object upon clicking the selection checkbox not the row click.

Tatu Lund
  • 9,949
  • 1
  • 12
  • 26
Munendra
  • 33
  • 6

1 Answers1

2

You should use grid.addSelectionListener(..) for this. SelectionEvent is fired each time you change selection, i.e. click the checkbox in case of multiselection model. In case SelectionEvent is instance of MultiSelectionEvent you can get the last added selection

https://vaadin.com/download/release/8.3/8.3.3/docs/api/com/vaadin/event/selection/MultiSelectionEvent.html#getNewSelection--

Or removed selection

https://vaadin.com/download/release/8.3/8.3.3/docs/api/com/vaadin/event/selection/MultiSelectionEvent.html#getRemovedSelection--

Tatu Lund
  • 9,949
  • 1
  • 12
  • 26