Hi,
I am loading the content from a database table which gets displayed in the UI table.
The last column named "test" contains an index to another table (list of cities). This table depicts from which city a person is.
//Define some sample data
var aData = [
"Dente", name: "Al", checked: true, gender: "male", test: 1},
"Friese", name: "Andy", checked: true, gender: "male", test: 2},
"Mann", name: "Anita", checked: false, gender: "female", test: 1},
"Schutt", name: "Doris", checked: true, gender: "female", test: 3},
"Open", name: "Doris", checked: true, gender: "female", test: 3},
"Dewit", name: "Kenya", checked: false, gender: "female", test: 1}
]
The table of cities:
{key: "1", text: "City 1 ...."}),
{key: "2", text: "City 2 ...."}),
{key: "3", text: "City 3....."})
I cannot manage to display value "City.." in the combobox from some reason. Any idea how to solve this problem....
oTable.addColumn(new sap.ui.table.Column({
label: new sap.ui.commons.Label({text: "test 2"}),
template: new sap.ui.commons.ComboBox({items: [
new sap.ui.core.ListItem({key: "1", text: "City 1"}),
new sap.ui.core.ListItem({key: "2", text: "City 2"}),
new sap.ui.core.ListItem({key: "3", text: "City 3"})
]}).bindProperty("value","test")
}));