Hi SAPUI5 Buddies,
I am trying to implement a sap.m.Table in a mobile app. The table implementation is not the same as the sap.ui.commons.Table. Can anyone write a short code about how to add a column for such code? Please add codes in the codes below:
// Here is my list data
var names = [
{firstname:"Jim1", lastname: "Dan1"},
{firstname:"Jim2", lastname: "Dan2"},
{firstname:"Jim3", lastname: "Dan3"},
];
var oTable = new sapi.m.Table();
oTable.addColumn(new sap.m.Column({
header: new sap.m.Label({text:"Firstname"}),
}));
oTable.addColumn(new sap.m.Column({
header: new sap.m.Label({text:"Lastname"}),
}));
Here is question: how to bind the list data into the 2 columns (please add codes above)?
Thanks very much in advance!
Br,
Dong