Skip to Content

How to differentiate checked and unchecked item when we trigger the selectionchange event in table?

I want to know whether checkbox is checked or not in the table.i am using multiselect

showing checkboxes. So i am getting the data by using selectionchange event.

So how can i check whether the checkbox is checked or not in the table when i am using the Selectionchange event.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • Best Answer
    Jun 29, 2018 at 07:38 AM

    i used getSelected() method to Find the checkbox is checked or not

    Add comment
    10|10000 characters needed characters exceeded

  • Jun 28, 2018 at 02:13 PM

    the easiest way would be to have a model bound to the table so that when the selection changes, your model is updated automatically ... aka... 2-way binding. check out the 2 way binding on the official documentation

    https://sapui5.hana.ondemand.com/#/topic/c72b922fdb59422496661000165d7ff1

    Add comment
    10|10000 characters needed characters exceeded

  • Jun 28, 2018 at 02:20 PM
    oControlEvent sap.ui.base.Event getSource sap.ui.base.EventProvider getParameters sap.ui.core.Item

    Item which selection is changed

    selected boolean

    Selection state: true if item is selected, false if item is not selected

    just check the parameter

    Add comment
    10|10000 characters needed characters exceeded