Hi Sheetal, You are bound to get runtime error if you set the DateField directly as itemRenderer. Create a new MXML Component and put the following code in it and set this component as the itemRenderer for your field..
<?xml version="1.0" encoding="utf-8"?> <mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%"> <mx:Script> <![CDATA[ import mx.controls.DateField; override public function set data(value:Object):void{ super.data = value; if (value.Actual != null){ var dtf:DateField = new DateField; dtf.selectedDate = DateField.stringToDate(value.Actual,"MM/DD/YYYY"); this.addChild(dtf); } } ]]> </mx:Script> </mx:Canvas> Regards, Venkat www.venkatv.com On Sat, Nov 29, 2008 at 4:14 PM, sheetal <[EMAIL PROTECTED]> wrote: > > Hello, > I am binding an xml with ADG which has an itemrenderer-DateField.I am > getting this exception of not able to convert Date to string.Can some > one tell me where to convert this string to Date. > > <mx:AdvancedDataGridColumn headerText="Start Date" > dataField="@startDate" itemRenderer="mx.controls.DateField" > editable="false"/> > > Above is the code. > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

