Skip to Content

selectionChange not firing

Hi,

I have an sap.m.Table control that is populated with data.

<Table id="idBPList" inset="false" selectionChange="onSelectionChange" items="{/value}">

...

</Table>

I have defined "onSelectionChange" in the controller but the function does not get called when I click on a row in the table. What do I need to do to "select" a row that will fire the selectionChange event.

Thanks,

Mel

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    May 14 at 04:47 PM

    Hi,

    I was able to select and fire the event when I set the mode to

    "SingleSelectMaster".

    <Table id="idBPList" inset="false" mode="SingleSelectMaster" selectionChange="onSelectionChange"

    There are other modes available under sap.m.listmode in the documentation.

    Regards,

    Mel

    Add comment
    10|10000 characters needed characters exceeded

  • May 10 at 08:23 PM

    you need to set the table property "includeItemInSelection=true"

    <Table id="idBPList" inset="false" selectionChange="onSelectionChange" items="{/value}" includeItemInSelection="true">
    ...
    </Table>
    
    Add comment
    10|10000 characters needed characters exceeded