hi,

Thanks krishna,

Below i have given the code i have used for item rendering with image in a
datagrid column. The code shows a clip image when there is an attachemnt for
that record, else an blank image is displayed. I am using Flex SDK 3.5 . The
problem is when a record is choosed to edit or a new record is inserted and
refreshed the datagrid, image is not rendering properly but when i do a page
refresh(F5) it is rendering as expected. Did i missed any thing.


<mx:HBox xmlns:mx="http://www.adobe.com/2006/mxml"; horizontalAlign="center"
verticalAlign="middle">
     <mx:Script>
        <![CDATA[
      [Embed(source="./clip1.png")]
            [Bindable]
            public var clipImg:Class;

            [Embed(source="./unclip.png")]
            [Bindable]
            public var unClipImg:Class;

            private var vo:ObjVO; //VO object for holding object details

            override public function set data(value:Object):void {
                vo = value as ObjVO;
                if(vo != null)  {
                    super.data = vo;
                    if (vo.isAttachAvailable == true) {
                        onClip.source=new clipImg();
                        onClip.useHandCursor = true;
                        onClip.buttonMode = true;
                    }else{
                        onClip.source = new unClipImg();;
                        onClip.useHandCursor = false;
                        onClip.buttonMode = false;
                    }
                }
                // Dispatch the dataChange event.
                dispatchEvent(new FlexEvent(FlexEvent.DATA_CHANGE));
            }


        ]]>
    </mx:Script>

    <mx:Image id="onClip" height="20" width="22" /></mx:HBox>

regards
dme

On Thu, Feb 25, 2010 at 6:21 PM, krishna shinde
<krish.shinde2...@gmail.com>wrote:

> Hiii,
>
> just go through it , may help you
>
> http://livedocs.adobe.com/flex/3/html/help.html?content=cellrenderer_7.html
>
>
>
> On Thu, Feb 25, 2010 at 5:50 PM, dme <mails4...@gmail.com> wrote:
>
>> Hi,
>>
>> I need to display image in data grid cell based on its Boolean value.
>> Below i am descripting my requirement. let me know if any help
>> available.
>>
>> I have a column in data grid which is of Boolean type.  If true a lock
>> image has to be displayed in that particular cell to show that the row
>> is locked. Can anyone suggest me the way to implement, also if any
>> samples available let me know it.
>>
>> thanks
>> dme
>>
>> --
>>
>> You received this message because you are subscribed to the Google Groups
>> "Flex India Community" group.
>> To post to this group, send email to flex_in...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> flex_india+unsubscr...@googlegroups.com<flex_india%2bunsubscr...@googlegroups.com>
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/flex_india?hl=en.
>>
>>
>
>
> --
> Krishna Shinde
> GridLogics Technologies
> 9028903199
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Flex India Community" group.
> To post to this group, send email to flex_in...@googlegroups.com.
> To unsubscribe from this group, send email to
> flex_india+unsubscr...@googlegroups.com<flex_india%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/flex_india?hl=en.
>

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

Reply via email to