Hi,

I have advanced datagrid which im creating dynamically in
actionscript....each time the column of datagrid will be different...

Now im using itemrenderer to columns to display values of columns in
different colors.. but my problem now is,each column is having
different rules(conditions) to give colors...

Like..column 1--- >50 red, <100 green  , else black
         column 2---->200 red , <1000 green ,else black..


Since column varies each time , condition also varies... and i dont
want to use item renderer for eack grid column differently... is there
any way to do it more dynamically? like by passing column name and
condition in item renderer?

If yes please suggest me the solution...please provide me some good
code as im new to this..


oColumnDef.itemRenderer=new customColorComponent();


public class customColorComponent extends Label implements IFactory
        {

                public function customColorComponent()
                {
                        super();
                }
                override public function set data(value:Object):void
                {
                        
if(AdvancedDataGridListData(listData).dataField=='value1')
                        {
                                if(value != null)
                                {
                                        super.data = value;
                                        
if(value[AdvancedDataGridListData(listData).dataField] < 100) {
                                                setStyle("color", 0xFF0000);
                                        }

                                }
                        }
                }



but if i do like this for each column i have to write code..but dont
want like that...pls suggest me any way of passing column name and
rules to itemrenderer class..pls its urgent..

Thanks in advance:)

-- 
You received this message because you are subscribed to the Google Groups "Flex 
India Community" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/flex_india?hl=en.

Reply via email to