Skip to Content

Determine index of line sap.m.table where something was changed

Hello,

i have an sap.m.table wiht

C1 C2 C3 C4 c5

Text text Radiobuttongroup Text
..

..

Text text Radiobuttongroup Text.

When a radiobutton is selected the onSelect Event is triggerd.

Is there an easy way to get the Index of the line in the table where the button was selected?

At this moment i use oEvent.getId() and split it so that i get the index number from there.
Is there an easier way to accomplish that?

Regards

Dirk

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Aug 02, 2017 at 06:07 PM

    why you want to know?

    Add comment
    10|10000 characters needed characters exceeded

  • Aug 02, 2017 at 05:47 PM

    Check with the mProperties method of the onSelect event of the radio button group. If you can get the selected item, that should give you the index of the row.

    Regards,

    Sharath

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 03, 2017 at 03:35 AM

    there are many ways. One way is to use binding path

    http://jsbin.com/pulenom/edit?js,output

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Dirk Wieczorek

      Since you are binding to Target_Group_Model then you have to do this

      var oContext = oEvent.getSource().getBindingContext('Target_Group_Model');