cancel
Showing results for 
Search instead for 
Did you mean: 

Table row colour loading problem

Former Member
0 Kudos

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);

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi D,

Thankyou.It is helpful.

former_member182862
Active Contributor
0 Kudos

Hi Velu

Here is an example

Hope this answer your question.

-D