on 12-03-2015 7:16 PM
Hi,
I have this TreeTable:
http://jsbin.com/gobogihezu/1/edit?html,output
As you can see in the example, I only define one column while the the other is created automatically by the control.
Is there any way I can add checkboxes to this column that is used for selecting rows? (expected result in the picture below).
According to the documentation, a TreeTable
[...] provides the same functionality as the Table control and adds the possibility for an hierachical tree view in the first column.
(emphasis mine)
So the first column will always be the expandable tree item. But you can of course make the TreeTable multiselect, which has the same effect as checkboxes
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Robin answered it....a TreeTable has the same functionality as the Table control (for which you can set it's " getSelectionMode" to "mult row" and get the "checkboxes" and you can set "EnableSelectAll" which puts the nice "select all" checkbox up in the top left corner).....what he is saying is that the first column ....after your row-selector checkbox.....will then ALWAYS have to be the "tree".
So yes...you can do it.
Thank you, Cristopher, useful info, I managed to get the functionality going.
I can click cell #1 and select the whole row.
I can click the top-left corner for the "Select All" functionality.
Progress so far:
JS Bin - Collaborative JavaScript Debugging
But I still have these two problems:
1. How can I get the checkboxes showing (they work, as I mentioned above, but they don't show, the first column is empty)
2. How can I replace the "Select All" icon with a different one?
Thanks again for your replies.
You can refer to this link for more information
Not following you....your JS Bin example already had it set as Blue Crystal but is not working as you wanted. What did you change?
<script src="https://openui5.hana.ondemand.com/resources/sap-ui-core.js" id="sap-ui-bootstrap" data-sap-ui-theme="sap_bluecrystal" data-sap-ui-libs="sap.m, sap.ui.table, sap.ui.commons"></script>
User | Count |
---|---|
86 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.