I have used Tree to display all the data. I have expanded the data having the same LoanId with different IssueAmount . My output is as shown in the Image.
In the Image the row containing S.No. 3 is the parentItem and the one below it in yellow color is it’s subItem.
I can access the Parent Items. Suppose i want to access the third column of third row, I can acess it using the code as follows:
TreeItem Item[] = tree.getItems();
System.out.println("The Item is"+Item[2].getText(2));
Similarly i want to have access to the subItems(the ones highlighted in yellow). How can i have access to the subItems . Thank You..
Use
TreeItem.getItems(). Note that sub items are only available if the parent node has been expanded at least once.