cancel
Showing results for 
Search instead for 
Did you mean: 

igrid setMatchColors

Former Member
0 Kudos

Hi

how do I set Match Colors in javascript for multiple colors

I tried

obj1.getGridObject().setMatchColors("#aa0000,#bb0000")

but it just seemed to ignore this.

Thanks in advance

Nick

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi, Nick (and everyone). Here's a tip for using any color-context sensitive applets in MII. Instead of doing numeric matching or complex string matching on the client side, use a BLS transaction and the "calculated column" action to create an additional column in your dataset called "RowColor", and use string matching to match a textual string ("red","green","blue") to the corresponding color code.

This way, you can use the "stringif" function along with all of the expression capabilities of BLS to define the "rules" for selecting a color.

Former Member
0 Kudos

That's good advice, however it doesn't work properly in 12.0.2 b88 which I'm using (see other forum topics for this), and the setMatchColors is a workaround.

Does anyone know if it's fixed in any later builds?

Former Member
0 Kudos

Sorry I have now got this to work, might have been a case sensitive thing?

obj1.getGridObject().setMatchColors("#AA0000,#BB0000")