Reputation: 3346
I am new to Vaadin, trying to figure out how I can implement column selection on headerClick in Vaadin (the expected result: i click on any column and it becomes selected, just like row).
Seems that it is not so obvious to do. Please, can anyone advice me on that issue? Thank you in advance!
Upvotes: 0
Views: 335
Reputation: 5775
Unfortunately, There is no API to do that in the current Grid and Table components. But as @Morfic mentioned you can configure a HeaderClickListener and then you'll have to save the column clicked as a state somewhere and add a wrapper on top of your datasource collection to get the data of the column in a scalar valued list.
If you need Excel-like features please check out Vaadin Spreadsheet component, it's a paid component but will work for you.
Upvotes: 1