on 01-14-2015 7:09 AM
Hi,
I saw few examples to color the table cells using formatter function definition in columnlistitem.Please suggest / recommend sample code to read model data directly to validate and display colors of tablecells based on validations as column names also dynamic.
Regards,
Koti Reddy
Hi,
as of now I tried to display colors dynamically for first column elements if cell content matches with some string but I font color is not changing.
Tried below code from onUpdateFinished method .
var items = sap.ui.getCore().byId("ViewId").byId("table").getItems();
for (i = 0; i < items.length; i++) {
var item = items[i];
var obj = item.getBindingContext().getObject();
if (obj.status === "Not Well") {
$(item.$().find('td')[0]).addStyleClass("columnStyle1");}
}
from debugging , I was able to read all items and data as well but my CSS style is not adding to change font color of the first element.
.columnStyle0 {
color: red;
}
.columnStyle1 {
color: green;
}
Please let me know your recommendations on above procedure.
Regards,
Koti Reddy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.