Skip to Content
0
Aug 25, 2015 at 03:10 PM

How to change style class of td in table

792 Views

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.

B.R.

Mingquan

Attachments