cancel
Showing results for 
Search instead for 
Did you mean: 

How to highlight specific data cell columns

Former Member

Hello,

Is it possible to select a specific column in the Cross Tab component, in the data cell area using CSS?

If so, please let me know how this can be achieved without using conditional formatting from BEx.

Thanks,

Hanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Thank you Vidhya, that was helpful to get a step closer.

By removing the div:after, the final code used to highlight a data cell column is:

.myCrossTab .sapzencrosstab-DataArea td:nth-child(1).sapzencrosstab-DataCellDefault {
background: rgba(0,0,0,0.5)!important; 
}

Now to take this a little further... Is it possible to apply two CSS classes to one crosstab?

EXAMPLE:

I need to highlight two columns dynamically, can I do something like?

.myCrossTab .col1 .sapzencrosstab-DataArea td:nth-child(1).sapzencrosstab-DataCellDefault {
background: rgba(0,0,0,0.5)!important; } .myCrossTab .col2 .sapzencrosstab-DataArea td:nth-child(1).sapzencrosstab-DataCellDefault { background: rgba(0,0,0,0.5)!important; }

and how can I call this in the script?

Thanks,

Hanks

Former Member
0 Kudos

Found the solution:

define it as .myCrossTab.col1{} and .myCrossTab.col2{}

to call it, use scripting to set CSS as "myCrossTab col1" and "myCrossTab col2"

Answers (3)

Answers (3)

Vidhya
Active Participant

Hi,

Please see below blog for requirement,

https://blogs.sap.com/2016/12/08/format-your-own-symbol-in-the-crosstab-using-css-sap-design-studio-...

And also here the CSS code for check the particular column in crosstab,

sapzencrosstab-DataArea td:nth-child(5).sapzencrosstab-DataCellDefault div::after {

content: ” %”;

}

Regards,

Vidhya.C

TammyPowlas
Active Contributor
0 Kudos

Please see Eshwar's reply here: https://archive.sap.com/discussions/thread/3876503

Former Member
0 Kudos

Thanks Tammy, however Eshwar is changing the entire datacell area to another color.

I am looking to change the color of a specific Column within the Data cell.

TammyPowlas
Active Contributor
0 Kudos

Hi - please see Venu's blog of CSS https://blogs.sap.com/2015/04/22/list-of-css-for-sap-design-studio/ to give you some ideas

Former Member
0 Kudos

Thanks Tammy but I need to be more specific than ".sapzencrosstab-DataCellContentDiv" as I am trying to highlight a column within the DataCells