on 03-14-2017 12:06 PM
Hello everybody,
is it possible to make the checkboxes of a sap.m.tree with mode multiselect so that they are not editable anymore?
The case I have looks similar to this:
I have also set this up in jsbin:
http://jsbin.com/lemerusapa/edit?html,js,output
Now I would like to make sure, that once the tree is loaded the checkboxes cannot be edited anymore.
I guess, that I will have to access the "editable-porperty" of the checkboxes:
But I didn't specifically create the checkboxes, but rather just chose the mode="MultiSelect" for the Tree in order for the checkboxes to show up. And now I have no clue how to access them to change the property.
Thanks in advance for your help!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Tree control is a composite control which contains check box and text elements. Check box properties cannot be accessed directly as this is defined as a private aggregation...
Found a dirty method for your problem(dont use this in production as after upgrade's property name might change). use the below code to disable check box...in this case disabling checkbox for item 0 (root item)
this.getView().byId("Tree").getItems()[0]._oMultiSelectControl.setEditable(false);
Update JSBin code
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks to both of you for your quick help!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
From UIControl(tree) point of view multi select means you are enabling the control so that user can select entries. With standard properties this may not be possible....
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.