Using following code, I', trying to render item in advance data grid but it's not working. What's wrong with the code ?
if(col.headerText=="Status") {
statusItemRendererFactory = new ClassFactory(Renderstatus);
col.itemRenderer = statusItemRendererFactory;
}
package {
import mx.controls.*;
import mx.controls.dataGridClasses.*;
public class Renderstatus extends Label {
override public function set data(value:Object):void
{
Alert.show("in");
if(value != null)
{
super.data = value;
if(value.status!="Removed") {
setStyle("color", 0xFF0000);
}
else {
setStyle("color", 0x000000);
}
}
}
}
}