javascript - Styling Table in SAP UI5 -


I need to give the background of the column in UI 5 by javascript and css and change the font style of the table. I have to know that CSS has to apply for it, so how can I get a special element?

Add the way you want the class to your table or column>

  oTable.addStyleClass ("classname");   

Use CSS as usual

  .classname {color: red}   

and this CSS file In the index .html

Based on your comment: Use this to add an ID to the table header column like this

  var oColumn = new sap Ui.table.Column ("TC", {label: new sap.ui.commons.Label ({text: "Last Name"}), Template: new sap.ui.commons.TextView (). BindProperty ("text" , "Lastname"), sort property: "last name", filter property: "last name", width: "200px"});   

Here the code has been added to id = tc .

You need to write css

  #tc {color: red}   

< / Html>

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -