on 08-23-2017 2:30 PM
Hello,
I am working on coloring rows in my table depending on the data and doing the check in the controller of my XML view.
I noticed, that SAP UI5 will not call the onAfterRendering method on the Table, if I reload it with other data, but the same number of rows.
Is there a way to force to call the onAfterRendering method on my table?
oTable.addEventDelegate({
"onAfterRendering": function() {
//Color Rows
var aItems = oTable.getItems();
var i;
if (aItems && aItems.length > 0) {
for (i = 0; i < aItems.length; i++) {
var aCells = aItems[i].getCells();
if (aCells[3].getText() === "Load PORT") {
aItems[i].addStyleClass("rowBackground");
}}}}
}, this);
You can do this thing onAfterRendering method of a view not the table control.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No, you cannot call the onAfterRendering. These are standard hook methods.
For your purpose of handling the coloring of the table based on data, you need to handle with some other events.
Regards,
Sharath
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
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.