Skip to Content

How to use getMatchValues, setMatchColors in iGrid


Hi,

I am using MII 14.0 SP04.

I want to set the colors of a row based on a column value at run time for a iGrid.

Is it useful to use getMatchValues, setMatchColors in this context?

If any one know to use this or set the color of iGrid at run time based on Grid value, please explain how to use.

I try for setCellBackgroundColorAsString. After few minutes, the colors are disappeared.

Thanks,

Raman N

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Oct 16, 2015 at 04:14 AM

    Hi Raman,

    Match Values and Match colors can be defined in iGrid Template. Once you provide value ranges, it compares the values dynamically and assignes colors accordingly.

    Not necessarily you should use this in code, the configuration from template itself should work.

    Thanks and Regards,
    Swaroop

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Raman Nagarajan

      Hi Raman,

      Enhance your Transaction/Query that it will give data as below.

      Then you can use the above method and set the color context Run time like this.

      Grid.getGridObject().setMatchColors("Red,"Blue");

      Grid.getGridObject().setMatchColumns("Color");

      Grid.getGridObject().setMatchValues("String:EXACT_MATCH:Red;String:ExactMatch:Blue");

      It will result in your grid like this :

      Regards,

      Sriram

      1.png (9.5 kB)
      result.png (10.2 kB)