on 08-08-2023 8:48 AM
Hi,
I am using m table with mode="MultiSelect".
I have input control in my table column and I able select the table row as soon as i enter any values. i used oTable.setSelectedItem(oTable.getItems()[index]); and it works fine.
oTable.setSelectedItem(oTable.getItems()[index]);
But i am not able to uncheck the checkbox from the selected row as soon as i remove value from input control.
oTable.removeSelections
oTable.removeSelections remove all the checkboxes but i need to remove only selected row.
please advise
Hi Raza,
The method setSelectedItem takes two parameters
1. oListItem -> the item which you want selected or unselected, which you are already passing
2. bSelect? -> whether it should be selected or deselected. The default value for this optional parameter is 'true', but if you pass false instead, it would deselect the item.
oTable.setSelectedItem(oTable.getItems()[index], false);
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Leoni,
I am using Ui Table and my selections are getting cleared after sorting the column. I saw your response to similar question. I tried the solution but still no luck. May I know in which event/method I need to implement your piece of code and can you please elaborate how to pass multiple selected rows. The method setSelectedIndices() is throwing an error saying that setSelectedIndices is not a method. Kindly help.
var oTable = this.getView().byId("Table");
var oRow = oTable.getRows()[1];
oTable.setSelectedIndex(oRow.getIndex());
User | Count |
---|---|
70 | |
9 | |
9 | |
7 | |
6 | |
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.