Skip to Content
0

Making rows of sap.ui.table.TreeTable selected

Jun 20, 2017 at 01:52 PM

68

avatar image
Former Member

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.

Regards,

Karan

tree-table.png (32.1 kB)
expanded-node.png (32.2 kB)
expand2.png (31.8 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

avatar image
Former Member Jun 21, 2017 at 01:15 PM
0

Hello guys,

Can anybody help me out with this issue.

Regards,

Karan.

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Jul 04, 2017 at 01:18 PM
0

Hi Karan,

You can have an extra column for check box and achieve this.

Try this code if it is helpful, tree table with dynamic check box enabling.

https://jsbin.com/metufiw/5/edit?js,output.

Regards,

Mahi Theja.

Share
10 |10000 characters needed characters left characters exceeded