Hi,
Use like this.
oTable.addColumn( new sap.ui.table.Column({
label: new sap.ui.commons.Label({text: "ID" }),
visible: true ,
template: new sap.ui.commons.TextField({value: "{products>ID}" })
}));
in place of this.
oTable.addColumn(
new sap.ui.table.Column({
label: new sap.ui.commons.Label() .bindProperty("text","Username") ,
template: new sap.ui.commons.TextField() .bindProperty("value","Username") ,
sortProperty: "Username"
}));
and your code will work.
and it's better to initialize your model in Init method of controller like this.
var oModel = new sap.ui.model.odata.ODataModel( "proxy/http/services.odata.org/V3/(S(3ngooq0fkelm0nublhbj01xu))/O