cancel
Showing results for 
Search instead for 
Did you mean: 

Smart Table - Get Row

08-20-2017 5:34 PM
3870 views 2 comments
0 Likes
SAP Managed Tags
Subscribe

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

0 Likes

Accepted Solutions (0)

Answers (2)

Answers (2)

0 Likes

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

Sharathmg
Active Contributor
0 Likes

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

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