cancel
Showing results for 
Search instead for 
Did you mean: 

Cell Coloring Cell Based On Another Cell

Former Member
0 Kudos

Hello,

We have a case where we are color coding cells on a grid based on a query that runs an xAcute transaction that is relatively slow.

We are coloring cells based on values of other cells. For example, we may want to highlight a Part Number in red when the part number cannot be found in another system. The value of the part number cell does not determine the color but we have another hidden column that tells us whether or not to hightlight the cell.

We did not see a way to acheive this use the Display Template's Color Context tab. We are doing the color coding in JavaScript.

How can we guarentee that the applets query is finished before we attempt to do the color coding? The best we know to do at this point is to turn OFF the initial update of the grid and, in a body onload JavaScript function, call refresh() on the applet and then do our color coding.

Is there a better way to do this? I wish there was a way to handle this in the Display Template but we don't see a way to color a cell (not a whole row) based on the value of another cell.

Thanks in advance.

Mike

Accepted Solutions (1)

Accepted Solutions (1)

jcgood25
Active Contributor
0 Kudos

Mike,

The iGrid's UpdateEvent will be fired each and every time the underlying query has been run and 'painted' into the applet. The FirstUpdateEvent (immediately followed by the UpdateEvent) will fire only once upon the initial applet rendering with query data, and is a proper trigger point to use instead of the body onload.

Easy way to see how they work is to declare them in your applet parameters and then put a corresponding alert message in the functions. The nice thing is that the modal alert dialog will pause the activity so you can see it developing.

Regards,

Jeremy

Answers (1)

Answers (1)

Former Member
0 Kudos

I've only been able to do this functionality in a grid applet by javascript. You might consider using a XSL stylesheet and render HTML, you will find it renders much faster.

Former Member
0 Kudos

Doug,

Thanks for your suggestion. I am relying on other grid functionality so this is not an option for me.

Thanks,

Mike