In the general case, I think you’ll need to store enough context info in your cell so that you can track back to the parent from it in a ItemClickListener / SelectionListener. So wrap your Bean in a class that contains the Parent info.
If you’re using the in-memory TreeData, that has a getParent() method as well.
Hi all,
I don’t know how to get parent of one row which has cell is clicked.
Example regards to my attached image,
when I click cell which has value is 31 on [Hours Done]
,
How could I know its parent is [Customer Project 2]
, its grandparent is [Year 2012]
?
Thank you so much.
I found way to solve my above issue.
By the way, is there any way to get all data in row when I click on that row.
Example regards above attached image,
I click on row which has value “prototype” on column [name]
, then could I get information of [Hours Done]
is “44” and [Last modified]
is “09-Dec-2016 13:19:32” of that row?
Does Vaadin support that case ?
Yes, each row item in TreeGrid represents a Bean object, so all the information on a specific row should be accessible (unless it’s generated, in which case you should be able to generate it again).