Skip to Content
avatar image
Former Member

Smart Table - Get Row

Hi Expert,

I am using the Smart Table in my application and TableType = "sap.ui.table".

Please could you help me how to get the selected row based on click on Button.

Thanks & Regards,

Dhiraj

table.jpg (82.3 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Aug 21, 2017 at 06:33 PM

    Hi Sharath,

    Thanks for reply.

    I am not getting the selected row.

    My question is- Inside smart table I am using ui.table so how I will get the selected row.

    And also column can be in any order because setting functionality is there in smart table so user can hide or show the columns as needed.

    Please could you tell me how to get the selected row data.

    I written the below code to get the data:

    ---------------------------------------------------

    var totalItem = oTableHUnit.getBinding("rows").getLength(); //oTablePartner.getRows()[0].getCells()[1].getText() /*for (var i = 0; i < 1; i++) { var currentRows = oTablePartner.getRows()[0]; shipfrom = { Kunnr : currentRows.getCells()[1].getText(), Company: currentRows.getCells()[2].getText(), Address1: currentRows.getCells()[3].getText(), City: currentRows.getCells()[4].getText(), State: currentRows.getCells()[5].getText(), Postalcode: currentRows.getCells()[6].getText(), Telephone : currentRows.getCells()[7].getText() }; }

    -----------------------------------------------------

    Thanks & Regards,

    Dhiraj

    Add comment
    10|10000 characters needed characters exceeded

  • Aug 21, 2017 at 07:24 AM

    First, get the internal table using <smarttable>.getTable().

    It seems like sap.ui.table and for that, you can use - getSelectedIndex

    Add comment
    10|10000 characters needed characters exceeded