Skip to Content

Retaining the selection of rows in sap.m.Table , even when the binding changes.

Hi Experts,

I have a requirement in which i have to provide multiple row select property to the given sap.m.Table. Once the rows are selected , i have to fetch the selected rows only into the same table by eliminating the rest of the rows. I did this using runtime json.

The problem is - Once the user presses the "SHOWALL" button , the table should show all the previously present selected or unselected items, irrespective of their selection. But the rows selected previously should remain selected(the corresponding checkboxes of the selected rows should remain checked ) as earlier.

I am attaching my code with this.code.txt. Please tell me whether it is possible to achieve this ?

Thanks in advance.

code.txt (8.6 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    May 26, 2017 at 12:59 PM

    Hi Aman Anand,

    You can have one property value in your model "Selected" : "false". Bind it to the item property "selected".

    So automatically when you make selection. The model will be updated and it will retain

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Ramesh,

      I have tried to bind the "Selected" property. Yet the model updation doesn't seem to happen. In my case i have to change the binding property two times in order for getting the desired result. But the seconde time the binding is not working as it should.

  • avatar image
    Former Member
    May 26, 2017 at 02:01 PM

    Set property rememberSelections to true or false for the table depending upon your requirement.

    Add comment
    10|10000 characters needed characters exceeded