on 06-14-2016 5:23 AM
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Dennis,
I tried something like this using 'columns' aggregation, but it doesn't seem to work:
JS Bin - Collaborative JavaScript Debugging
Following is the error I see:
Regards,
Sai Vellanki.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi sai ,
For that u have to use formatting concept,
Available - Success - green color,
Out of Stock - Eroor - red color,
waiting - Warning - orange color.
you have to ccreate a new file Formatter.js and there u have to declare all the conditions how you are willing to display the values respective to the color.
please refer the below link about the formatter concept:
Thanks,
Deepak.
Message was edited by: Deepak Anumula
Deepak,
I need to do something like this using sap.ui.table.Table: Plunker
Above sample is done using sap.m.Table.
Regards,
Sai Vellanki.
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.