Skip to Content
Jun 20, 2017 at 01:52 PM

Making rows of sap.ui.table.TreeTable selected

1134 Views Last edit Jun 21, 2017 at 05:37 AM 2 rev

Hello experts,

I have Tree table in my application which shows Organization hierarchy in a dialog.I have a requirement wherein previously selected organizations should be selected default if I close the dialog and again open it.

For eg : Below Dialog is opened for the first time and I select 1 organization and close the dialog.

Now after opening the dialog, I want "Test_Org" organization to be selected by default. I am unable to achieve this requirement.

Organizations are loaded from backend when dialog gets opened.So on attachRequestCompleted() of Odata model, I tried to get the data from table by calling getRows() method assuming data is already loaded in the table from Odata call so that I can compare with my array which contains already selected organizations. However, I am not getting any entries in the table yet for comparision in attachRequestCompleted() method.

There is another issue as well wherein If I expand the node "Org for Testing" and select the organization "Org2" and now I collapse the node. Again when I expand the same node Organization "Org2" is deselected.




tree-table.png (32.1 kB)
expanded-node.png (32.2 kB)
expand2.png (31.8 kB)