cancel
Showing results for 
Search instead for 
Did you mean: 

iGrid Scoreboard coloring columns based on the condition

HariCS23
Contributor
0 Kudos

Hi Gurus

I have a scoreboard igrid and want to apply color scheme for two of the columns. one of the column values are predictable so that in the color context matching i have successfully created rules.

I have an another column whose values are not predictable and want to color that column based on some conditions ...

like ColumnValue >50 & ColumnValue <200 --one color and ColumnValue >350 & ColumnValue < 800 -another color ...etc.

I can't use invisible column concept since i want color specified columns....

Any ideas..Please advice..

Thanks

Hari

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

An AJAX approach will be easier than trying to make the iGrid do this. Just use a hidden iGrid as your "data pump", and in the update event handler, write some very simple Javascript which will create/update a DIV containing a table, and you can use styles to give whatever appearance/highlighting rules you want.

Alternatively, you could create an SVG object and animate it/render it on the server side using whatever animation rules/color rules you like, and then send it back to the HTML page as an image.

HariCS23
Contributor
0 Kudos

Hi Rick

Thanks for the Helpful answer apologize for late reply.

I thought and thinking of using kind of solution you proposed but i m using icommand to execute they query and looping to through the data and creating html script, and replacing with div's InnerHtml .

And i m curious to know what is the advantage of using grid as datapump and and using update event handler of the applet to generate the html script.

( So., this update event handler triggerd when when ever we refresh grid using document.<gridobject>.refresh() )

Please correct me and advice.

Thanks

Hari

Former Member
0 Kudos

Both the iCommand and hidden grid work fine, but if you're planning to do time-based refresh of the content, I just find the iGrid easier to use than setting timers in Javascript. The iGrid is definitely "bulkier" in terms of memory usage and load time, though.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hari,

It can be possible by Javascript,but atleast the return values should be fall under the specifed values as you mentioned like >50 and <200(specified values).

You can use fallowing methods:

document.APP.getGridObject().getMatchColors();
document.APP.getGridObject().getMatchValues();
document.APP.getGridObject().getMatchColumns();

Hope this helps you someway

-Suresh