Loading...
Important Notice - Forums is archived

To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Product icon
TUTORIAL

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.

Grid Header Click Events.

Paul Henry
6 years ago Jan 08, 2016 1:59am

Hi All,

We are using the Grid Component to display complex data, in a Grid. We have multiple Header rows (using Join to nest sub-categories) that Display "Column Headers" and we use the first several columns of each Row as "Row Headers", which are fixed to avoid scrolling. The main body of our grid (ie the scrollable bit of the Vaadin Grid Component) actually contains the Data on display.

If a user clicks on a cell in the main Body, we use an ItemClickListener to initiate processing that uses information about all Row and Colum Headers that intersect at the selected cell. If a user clicks on a "Row Header" value then we can still use the ItemClickListener to determine that a "Row Header" Cell was clicked and we intiate processing that uses only information about the specific "Row Header" value that was clicked on.

We need to do the same thing with the "Column Headers" in the Grids Header Rows. That is, when a user clicks on a specific "Column Header" value in one of the Grids Header Rows we need to initiate some processing that uses just that "Column Header" Value.

However i have been unable to find anyway to add a click listener to Header Rows of a Grid. Is there something i am missing?

Assuming that Its impossible to actually add click listeners to the header row, can anyone see any issue with me using the first few rows of the table as "Column Headers" and using a grid with no actual Header Row?

Cheers 

Paul