cancel
Showing results for 
Search instead for 
Did you mean: 

change color of a single cell in a Grid

Former Member
0 Kudos

hello to all, i have a Grid that have 13 fields and i want to change the color of a field when he reaches to a value...how i can change to this by code??

regards

Mário

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

hello Jamie i already use an iGrid for doing something else, so i dont want to change a lot of things...do you no how to to that by code?

regards and thanks for your answer in advance.

Mário

Former Member
0 Kudos

Mio,

you may have a look at the SAP help where the parameters are displayed to use for the color settings in a grid:

[iGrid Color Context Properties|http://help.sap.com/saphelp_xmii120/helpdata/en/44/cf149e3afb6f1ee10000000a155369/frameset.htm]

Inside a web page you can also use the properties directly in the applet definition like this:

<PARAM NAME="MatchMode" VALUE="String">
<PARAM NAME="MatchColumns" VALUE="Status">
<PARAM NAME="MatchValues" VALUE="ERROR,*"> 
<PARAM NAME="MatchColors" VALUE="#FFCC00,#EEF6FB">
<PARAM NAME="DynamicBackground" VALUE="true">

So if the column "status" gets the value "ERROR", MII will display the row in color "#FFCC00", else MII uses color "#EEF6FB".

Good luck!

Michael

Former Member
0 Kudos

Hi Mario,

Jamie is correct. The Scoreboard type of the iGrid looks like the regular Grid, with the exception that the color-contexting can be done at the cell level as opposed to the row level. I encourage you to just try changing the iGrid type to Scoreboard and play with the color-contexting as Michael illustrated.

Kind Regards,

Diana Hoppe

jamie_cawley
Advisor
Advisor
0 Kudos

You shouldn't need code to do this. Try using a scoreboard type grid and set the color change on the color context tab.

Jamie