cancel
Showing results for 
Search instead for 
Did you mean: 

FIORI -Access smart table row from CSS

0 Kudos

Hi All,

I am trying to color a smart table row based on one column value. My smart table is getting data from O-DATA entity set. I am not able to access smart table column using "tr" in CSS. Is there any way we can achieve this?

Thanks in advance

Accepted Solutions (0)

Answers (1)

Answers (1)

fdemir
Explorer
0 Kudos

Hi,

You have to give the smart table a special class. Then you can define the style of this class.

XML FILE
<smartTable:SmartTable class="privateSmartTableClass" Style.css --------- .privateSmartTableClass table tr { background: red; }
0 Kudos

Thanks Fatih for your help I am able to access the table now but not able to apply a condition on table column value. Could you please let me know what am I missing


.privateSmartTableClass table tr:not[data-column1 = ' ' ] {
background: red;

}

fdemir
Explorer
0 Kudos

Youre welcome. The link below will help you.

https://css-tricks.com/almanac/selectors/a/attribute/

0 Kudos

Thank you I had tried various options to identify row to set bg color and nothing has been working. Below are the list that I had tried ..Could you please let me know what am I missing here in CSS file

.myclass table tr[data-Col1 = " " ] (Col1 is directly from smart table)

.myclass table tr[data-CloCol1 = " " ] (Clocol1 is a custom column in XML file and it is cloned from smart table Col1)

.myclass table tr[data-KEY = " " ] (Clocol1 is a custom column in XML file and it is cloned from smart table Col1

KEY is defined as key in clocol1 creation )