Hi,
here is the code which is used for binding...
var oTable = new sap.ui.table.Table({ | |||
tableId: "table", | |||
visibleRowCount: 5, | |||
editable: false | |||
}); | |||
var oControl = new sap.ui.commons.TextView({text:"{District}"}); | |||
oTable.addColumn(new sap.ui.table.Column({ | |||
label: new sap.ui.commons.Label({text: "District Name"}), | |||
visible: true, | |||
template: oControl | |||
})); | |||
oTable.bindRows("/"); | |||
return oTable; |
-Mahi