Quantcast
Channel: SCN : Discussion List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 6412

table color,delete

$
0
0

Hi Experts,

 

I have the following requirements:

 

1) I have Input field and table (sap.m). In change event I'm getting the value for the Input and if that value is there in table I'm changing the color of the Icon.but I want to change total color of the row. How can I achieve that?

 

eg:

 

Initially my table is like below

 

Table:  Status    name    id

 

row1     red        As       123

 

row2    red        hi         456

 

Input:As   now I changed my table to

 

 

Table:  Status    name    id

 

row1     Green        As       123

 

row2    red        hi         456

 

 

sample Code:

 

handleChange:function(oEvent){

  var oValue = this.getView().byId("idInput").getValue()

  var olength=this.getView().byId('idTable').getModel().getData().results.length;

  for(i=0;i<olength;i++){

  var ocell1 = this.getView().byId('idTable').getItems()[i].getCells()[1].getText()

  if(ocell1 == oValue){

  var ocell2 =this.getView().byId('idTable').getItems()[i].getCells()[0].setColor('#FF0000');

 

  }

  }

 

   }

 

I tried like below code to change the color of the text, but it's not working

 

this.getView().byId('idTable').getItems()[i].getCells()[1].getText().fontColor('#FF0000');

 

 

 

 

2) And, I have mode="Delete" for table. If I'm deleting any records from the table the colors are changing to initial color(which is red in my case). But I want to delete selected row and keep remaining .


Viewing all articles
Browse latest Browse all 6412

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>