3.2.0

Rewriting cell content

Hi, I would like to rewrite the content of the grid, using the original content (the first characters of the string) to set properties (e.g color) of each cell, then removing these "special codes" to not make them appear in the screen. How can I reset the content of the cell with a new string. I appreciate any help. Thank you.

function myColor(){
var myText = this.getProperty("item/text");
// use some chars from myText to set the color of the cell...
var color = ... (OK)

// set the text property removing some chars
// from the original string
???

return color;
}
obj.getColumnTemplate(2).setStyle("color", myColor);
Jérôme
July 30,
Build text function in the similar way, then
obj.getColumnTemplate(2).setContent("text", myTextFunction);

However I would rather define separate data/color property like here:

http://www.activewidgets.com/messages/1007-4.htm

Alex (ActiveWidgets)
August 8,

This topic is archived.

See also:


Back to support forum