Hello All,
I am using factory function on 'rows' aggregation for sap.ui.table.table to display different control templates in one column. It doesn't give me values, model binding is working fine, I can see the scroll bar visible with paginator as well, but no values.
Please check the full code here and let me know where I might be going wrong: Plunker
Thank you!
Regards,
Sai Vellanki.
Hi Sai
I doubt your factory implementation will work because the template is in the column object.
Hi Sai,
I had done some change in your code
var oTable2 = new sap.ui.table.Table("oTable", {
visibleRowCount: 5,
navigationMode: "Paginator",
rowSelectionChange: function(oEvent) {
oController.onSelectionChange(oEvent);
}
});
//Define the columns and the control templates to be used
oTable2.addColumn(new sap.ui.table.Column({
label: new sap.m.Label({
text: "ID"
}),
template:new sap.m.Text().bindProperty("text", "ProductId"),
}));
oTable2.addColumn(new sap.ui.table.Column({
label: new sap.ui.commons.Label({
text: "Product"
}),
template:new sap.m.Text().bindProperty("text", "Name")
}));
oTable2.addColumn(new sap.ui.table.Column({
label: new sap.ui.commons.Label({
text: "Availability"
}),
template:new sap.m.ComboBox({
width: "150px",
value: "{Availability}"
})
}));
with that respective change i got this as output
To display the values in the combobox u have to use list items then u will get those values.
I hope this will be helpful.
Thanks,
Deepak Raj
Add a comment