:: Forum >>

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
Friday, July 30, 2004
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)
Sunday, August 8, 2004

This topic is archived.


Back to support forum

Forum search