Quantcast
Viewing all articles
Browse latest Browse all 3184

How to change style class of td in table

Hi Experts,

In SAPUI5, there is no APIs to change anything of the table cell itself.

The following code is aimed to modify the style of the td cell and control in the cell, but both of them adds style class to the control, not td cell.

Could anyone indicate how to change td cell style in a table?

editableFormatter:function(v, control){

   if(sap.ui.getCore().byId("btnEdit").getText()==="Edit"){

     control.getParent().getCells()[2].addStyleClass('readonly');

     control.addStyleClass('readonly');

  }

}

The top one is what I need by modifying html in debug tool.

The bottom one is current implementation.

Image may be NSFW.
Clik here to view.
td vs control.png

 

B.R.

Mingquan


Viewing all articles
Browse latest Browse all 3184

Trending Articles



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