Skip to Content
0
May 31, 2016 at 11:17 AM

getting dropdown value of selected sap.m.Table row

306 Views

Hi Experts

I have a requirement where there is a drop down in the 3 rd column of sap.m.Table. The drop down is filled from the entityset of oData.

3 columns with 3 cells , 1 st cell is Object Identifier, 2 nd is Date and 3 rd Cell is ComboBox (dropdown)

Table has a selection mode MultiSelect. where users can select multiple records

Table is not attached to any selectionChange event. No event is attached to table.

Now onClick of a button, I have to validate the Dropdown value filled or not in each selected Row.

Please let me know how to retrieve the Dropdown value of a selected row.

I am using the code like below

var rowSet= oTable.getItems();

var aContexts = oTable.getSelectedContexts();

for (var i=aContexts.length -1; i>=0; i--) {

var oSelectedListItem = rowSet[i];

var value = oSelectedListItem.getCells()[2].getValue();

}

this is not working getting value as undefined

Thanks and Regards

Kalyan