Spark datagrid that shows the new  value and that it previously was

Im trying to create a item renderer for a spark datagrid that shows the new  value and that it previously was and I am comparing in the set data, the problem I am having is that in teh set data I am frequently getting data from other rows (I know this because of virtual renderders), it there a way round this?
<?xml version="1.0" encoding="utf-8"?>
<s:GridItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
                    xmlns:s="library://ns.adobe.com/flex/spark"
                    xmlns:mx="library://ns.adobe.com/flex/mx"
                    currentState="unmodified">
    <fx:Script>
        <![CDATA[
            override public function set data(value:Object):void
                if(data){
                    if(super.data.margin != value.margin  && super.data.margin){
                        oldValue.text = '(' + super.data.margin + ')';
                    }else{
                        oldValue.text == '';
                super.data = value;
                stroke.visible = false;
                fillRect.visible = false;
                if(data){
                    if(this.data.isModifiedClientSide){
                        currentState = "modified";
                        fill.color = 0xddddff;
                        stroke.visible = true;
                        fillRect.visible = true;
                    else{
                        fill.color = 0xffffff;
                        stroke.visible = false;
                        currentState = "unmodified";
                        fillRect.visible = true;
        ]]>
    </fx:Script>
    <s:states>
        <s:State name="modified"/>
        <s:State name="unmodified"/>
    </s:states>
    <s:Rect top="0" left="0" right="0" bottom="0" id="fillRect" >
        <s:fill><s:SolidColor id="fill"  color="0xFFffff"  /></s:fill>
    </s:Rect>
    <s:Rect left="1" top="1" right="0" bottom="0" id="stroke">
        <s:stroke >
            <s:SolidColorStroke color="0x000099" weight="1"  >
            </s:SolidColorStroke>
        </s:stroke>
    </s:Rect>
    <s:HGroup horizontalAlign="center" verticalAlign="middle" top="0" left="0" right="0" bottom="0" paddingRight="5">
        <s:Label text="{data.margin}" width="50%" textAlign="right">
        </s:Label>
        <s:Label  id="oldValue" color="0xff0000" width="50%"  textAlign="right">
        </s:Label>
    </s:HGroup>
</s:GridItemRenderer>

If I recall correctly, you are talking about the default start page. To check if this is correct, type '''about:home''' in the awesome bar. If this is the same as your homepage, it will still be there when you update.

Similar Messages

Maybe you are looking for

  • Why is this date not between these 2 date range

    hi , when i execute the following select case when to_date('11/27/2006 11:58:35 PM' , 'mm-dd-yyyy hh:mi:ss am') not between   to_date('11/26/2006 9:04:33 AM', 'mm-dd-yyyy hh:mi:ss am') and to_date('11/27/2006 12:02:00 PM', 'mm-dd-yyyy hh:mi:ss am') t

  • Back-up projects

    How do I back-up my current imovie projects? I would like to be able to take the projects off of my external hard-drive (runnng out of room) and put them on DVDs so that I can use the video clips again in the future. Thanks for any help! Kathie

  • User type in SUIM report

    Hi, I am working on a custom user management tool . I had deployed the tool in two different system. Strangely the SUIM report of the two systems are different. The user Type value is different in both the system. Can you please help me out from wher

  • How to accpt terms and conditions?

    hey im looking on how i accpt the terms andconditions on my pay pal credit they? they sent me a email told me to look at them not sure if i have to click link to accpt it or what? can anyone point me in the right place?

  • Turn Down Opacity or Hide Layer

    Hi @ everybody, 1) I would like to turn on/off the layer (toggle hide) or turn down the opacity to 100%. Can you explain me how i can do that? I did a littl research and found just one forum post about opacity: PF_compositeMode     compositeMode.opac