I guess we’ll need the full example, I don’t see anything jumping out at me.

 


From: [email protected] [mailto:[email protected]] On Behalf Of P Trisnadi
Sent: Wednesday, November 02, 2005 9:46 AM
To: [email protected]
Subject: [flexcoders] Seeing double in DataGrid

 

I have a couple of columns in a DataGrid that are populated by using 2 different ImageCellRenderers. ImageCellRenderer1 displays either image A or B, and ImageCellRenderer2 displays either image C or D. However, when ran the first column always displays what is displayed in the second column. I tried switching the 2 columns, so that the latter column appears first, but the left column always adopt whatever is displayed in the right column.

Any idea what causes this?

The code for ImageCellRenderer is pretty straight forward:

<?xml version="1.0" encoding="utf-8"?>

    <mx:Script>
        var obj1:Object;
        function setValue(str:String,item:Object) {
            if (item.prm1=="0") {
                obj1=item;
                obj1.icon="obj1.jpg";
                visible=true
            } else {
                obj1=item;
                obj1.icon="obj2.jpg";
                visible=true
            }
        }
    </mx:Script>
    <mx:Image source="{obj1.icon}" verticalAlign="middle" horizontalAlign="center"/>
</mx:VBox>

TIA,
- ptrisnadi




--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex


YAHOO! GROUPS LINKS




Reply via email to