cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

iGrid - color of cell.

Former Member
0 Likes
271

Hi All,

I use a grid to show details.

The requirement is such that,

The first five column are colored in a single color regardless of row and to color the other column based on rows.

With the use of color context we can either get whole column can be colored or based on some condition rows can be colored with the help of different types of grid.

Here the requirement is combination of rows and column.

So I decide to do it by javascript. I set the cell back ground color and the update the grid.

document.iGrid.updaeGrid(false) - when this statement executes what ever the background setting I have done is removed.

Currently i am working 12.1.5 (build 95).

Long time ago i did a similar thing in 11.5 it worked fine.

In the script, I set the input Parameters( Start and End date) and update the grid with document.iGrid.updateGrid(true).

then I call this function to set the colors of the grid. but it is not working as expected.

To check the script is working properly, I called the same function through a button click event after the grid is loaded.

It set all the colors

then doument.iGrid.updateGrid(false) comes into place. when it is there all the colors set, will be removed. when this line is commented the script it is giving me the expected result.

Am I missing anything? Any permission required ?

User is happy with Grid, so I was not going to HTML

Regards,

Kishore

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Likes

Hi,

The problem is fixed.

SAP has fixed in new versions. (I tested 12.1.8)

Thanks and Regards,

Kishore kumar P S

Former Member
0 Likes

Kishore,

What patch level of Service Pack 8 is this fixed?

Thanks

jcgood25
Active Contributor
0 Likes

Kishore - you mentioned using different grid types, did this include Scoreboard mode which gives you color contexting by column? Using a built in color contexting should provide a better experience than scripting it, but at times that is the only way. Even using a wildcard to essentially force the first 5 columns to the desired color(s) would be a start, and then your script would only have to worry about the specific column, but I would try to stay as template based as possible.

If the iGrid cells are changing the way you need them to, then you do not need to use the iGrid updateGrid method, because it would repaint back to the normal color coding (and if using true it would requery the data too and potentially get out of sync with any scripted colors).

If you're not sure that your javascript loop is correct please post it.