Skip to Content

how to get the selected table cell data for sap.m.table

sample-11.pngHai Experts,

I am trying to develop one application with sap.m.table in sapui5. while giving the qty in input field, i need to get the corresponding unit price from the same cell(refer the attached image), ie. for first row it will be 10.00 and for second row it will be 11.00. how can i achieve this..??

I cant use mode here since the user is not accepting with that..

Please help me to resolve this..?

Thanks,

Muhsin

sample-11.png (4.0 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Jul 19, 2017 at 07:49 AM

    Subscribe for the event onFocusChange or onLiveChange or any event related to inputfield in the table cell.

    Code an event handler method in which, you get the index or row of the table in which you are editing. You can use oEvent.getSource.

    Once you have the index of the table, then you can get the price maintained in that row.

    Rest should be easy(multiply the quantity and assign to the total cell below the table.

    Regards,

    Sharath

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Sharath,

      Thanks for your reply..

      I am having nearly 5 columns and each column having different unit price value.So in each cell will have different unit price value.

      so how can i get the cell details in which am editing..?

      Thanks,

      Muhsin