3.2.0

color in colums

hey guys...

i have a colum that has this type of data..

1.3.6.1.4.1.476.1.42.3.2.4.1
1.3.6.1.4.1.476.1.42.3.2.4.2
1.3.6.1.4.1.476.1.42.3.2.4.2.1
1.3.6.1.4.1.476.1.42.3.2.4.2.2
1.3.6.1.4.1.476.1.42.3.2.4.2.3

i would like:
1.3.6.1.4.1.476.1.42.
black

the range
3.2.4.
to be say gray

then say the .1 rang to be blue .2 to be green and so on...

i have tried below. but its not a real number...
any help on how to do this would be awsome!


function myColor(){
var value = this.getItemProperty("value");
return value > 13614147614224 ? "red" : "blue";
}
obj.getColumnTemplate(1).setStyle("color", myColor);
-paul
January 24,
Is this the only column in the grid? If so, I suggest not using a grid at all, but instead use a List. Then create a function that breaks the string apart in the subStrings you need and create <SPAN>s out of then with the correct color for each span. Assemble the spans together to create a long string and stuff that string into each element of the List. If you have other things in the grid as well, then all I can say is "Good Luck". You might be able to use the proposed function to create the same string and put that in the cell. Or break the string into individual columns of narrow width with no header text. then each column can have it's own color assigned to it.

Good Luck.
Jim Hunter
January 24,
yeh there are there things in the grid.
just trying to make a graphical way to view very simular ranges of "ip's or values"

would also like to find a way to
say i have a words like:

RedOrangeYellowGreenBlue
RedOrangeYellowGreen
RedOrangeYellow
RedOrange
Red

in my xml...
any word...

i would like to parse through it and change the sections to color..
and no the arer not like that.
more like: rpgConditionControlEventReset
-paul
January 24,

This topic is archived.

See also:


Back to support forum