Skip to Content
0
Former Member
Aug 26, 2014 at 09:57 AM

Table row colour loading problem

24 Views

Hi,

Thanks for your time.

I want to display table row colour dynamically based on table data.

Am able to achieve it partially as below,when I scroll the table the loaded colour dissappears.

I use the below code:-

template: new sap.ui.commons.TextView().bindProperty("text","objectivecategory",function(category){

if(category=="Operational"){

backgroundColor='#fff2cb';

backgroundColorClass ="operationColor"

}

else if(category=="Strategic"){

backgroundColor='#e8f5fe';

}else{

backgroundColor='#ecf6c1';

}

cellId = this.getId();

//alert("cellId"+cellId);

$("#"+cellId).parent().parent().parent().css("background-color",backgroundColor);