on 12-19-2014 9:37 AM
Hello everyone,
I currently have an sap.ui.table with selection mode set to sap.ui.table.SelectionMode.MultiToggle and selection behavior to sap.ui.table.SelectionBehavior.Row.
My question is if there is any way I can programmatically(not by clicking on the table rows) select more than 1 row from the table. For example when the selection mod is set to sap.ui.table.SelectionMode.Single , i can use the setSelectedIndex(index).At first, I was expecting that setSelectedIndex(index) will add the row to the currently selected rows, but it just erase all previously selections and selects the current row.
Is there any workaround for this? Thank you.
And what if I don't want to select a block of rows?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
But this just selects intervals 1-x .. what about if I want to select 1, 5, 7 etc? a given sequence..
Hi, we have come in to a provisional solution.
The only method available in the TreeTable library that is able to set indexes without overwriting the previous selections is table.addSelectionInterval(0, 0), lk with that command you can add to the selection index the one in the 0 position.
Be aware that a bug is present in this work-flow, an infinite loop will be created, to prevent this use the command like this:
setTimeout( () => {linesTable.addSelectionInterval(0, 0)}, 1000 );
This is not a very clean solution but is the only way to make that posible nowadays, hope this help you and willing that sapui5 will resolve that issue.
Kind Regards,
Novotic-team
User | Count |
---|---|
80 | |
11 | |
10 | |
8 | |
8 | |
6 | |
6 | |
6 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.