Grid - get Column Header Name on Row Selection


User clicks on an item within the grid. How do you get the column name that selection is from?

Read through the book of Vaadin and the API, but could not find anything.


Yes, from the ItemClickEvent you can get the column (property) ID with getPropertyId().

Selection as such is for the entire row, not a specific column, but the ItemClickEvent knows where you’ve clicked. Consequently, when using keyboard, it’s possible to select rows (items), but it’s currently not possible to determine which column was focused when some key was pressed.

Awesome thank you! Yeah I was making it way too complicated.