Hi I am using the sap.ui.table having the multiple row selction mode. how to read all the rows which are selected by click on some button from table.
aContexts =sap.ui.getCore().byId("tableName").getSelectedIndices();
var oTable =sap.ui.getCore().byId("tableName");
for ( var i=0; i<aContexts.length; i++){
var oRow = oTable.getContextByIndex(aContexts[i]);
console.log ("In the if loop-->"+oRow.getObject().columnName);
}
I want to read the two clumn values in the table which are selected. but it is coming null. Can you share the code. thanks