Skip to Content
0
May 16, 2018 at 08:40 PM

Multi-select table - which items are selected?

110 Views

I have a MultiSelect table.

<Table id="idProductsTable" inset="false" mode="MultiSelect" selectionChange="onInvoiceSelectionChange" items="{ path: '/value', sorter: { path: 'DocNum' } }">

I need to iterate through the table and determine whether each item is selected or de-selected.

var oModel = oTable.getModel();

var ItemArray = oModel.getProperty("/value/");
length = ItemArray.length;

for (i = 0; i < length; i++) {

//How can I tell if the item is selected? "Selected" is not in the model data.

//Is there a better way to iterate the table?

......


}

Thanks,

Mel