I'm using TreeTableView , and I want to change the menu items that are associated to the context menu according to the data inside the selected row.
Suppose that I'm having a table with a structure like:
visitors
visitor 1
visitor 2
visitor 3
Chatters
chatter1
chatter2
Here in this table we can metaphorically say that we have two root nodes which are "Visitors" and "Chatters". Now, I want to have two context menus with different options. A context menu for visitors that we can say have one item which is "Invite to Chat" and another context menu that handles chatters and have different options like : "kick" , "ban" and so on. My problem is how can I achieve this scenario? Where should I use these context menus? Should I use them with cells, rows or the table?