Skip to Content
0
Former Member
Jun 02, 2017 at 10:33 AM

SAP UI Table : Set Actual Value to drop down (column) rows instead of default for all

83 Views

var xmlModel = new sap.ui.model.xml.XMLModel();
xmlModel.loadData("/XMII/Illuminator?QueryTemplate=.....&Content-Type=text/xml","",false);
    var inputListBox = new sap.ui.commons.ListBox();
    inputListBox.setModel(xmlModel);
inputListBox.bindAggregation("items","/Rowset/Row/",function(oId ,oContext)
{
      return new sap.ui.core.ListItem({
            key: oContext.getProperty("abc"),
            text: oContext.getProperty("abc")
        });
});
    var dropDownCol = new sap.ui.table.Column({
        width:"12%",
        label: new sap.ui.commons.Label({text: "ABC"}),
        template: new sap.ui.commons.DropdownBox({
            "association:listBox" : inputListBox
        })
    });
Here in this code, I have created a drop down column in the table, where I am assigning the row values as per xml model data per each row differently but the 1st value of the drop down is getting assigned instead of the actual value for every row.