HI,
[Bindable]
public var gridData:ArrayCollection = new
ArrayCollection([{label:false,name:new Date()},{label:false,name:new
Date()},{label:false,name:new Date()},{label:false,name:new Date()},
{label:false,name:new Date()},{label:false,name:new Date()},
{label:false,name:new Date()}]);

<mx:DataGridColumn dataField="name" >
                                <mx:itemRenderer>
                                        <mx:Component>
                                                <mx:Label/>
                                        </mx:Component>
                                </mx:itemRenderer>
                                <mx:itemEditor>
                                        <mx:Component>
                                                <mx:DateField 
focusOut="{data.name=this.selectedDate}"/>
                                        </mx:Component>
                                </mx:itemEditor>
                        </mx:DataGridColumn>
this sample code might help.if u say rendererisEditor ="true"
itemEditor and ItemRenderer will be the same

On Oct 29, 3:20 am, VJ <[email protected]> wrote:
> use both things... itemRenderer="Renderer your LabelRenderer"Date""
> itemEditor="Datefield" rendererIseditor=true. it should work
>
> On 10/28/10, Rohit Agarwal <[email protected]> wrote:
>
> > Hi,
>
> > I want to have a datefield as item renderer in my datagrid.
>
> > The twist is that a label containing the Date as a formatted string should
> > be shown in the normal case.
>
> > The datefield component should only show up when:
> >   1. The datagrid is editable
> >   2. The user clicks on the field containing the date.
>
> > The user should be able to select the date then and when that cell loses
> > focus, this date should be placed back into the label.
>
> > I also want to extend this to other components I'm using in my
> > 'AdvancedDataGrid'.
>
> > Basically I don't want the components showing up all over my datagrid but
> > want to access them only when an edit is required. I did see an example
> > somewhere a long time back. Anyone who can guide me on this please?
>
> > --
> > Rohit Agarwal
>
> > --
> > 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.

-- 
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