7 Replies Latest reply on Apr 29, 2009 3:27 AM by nikos101

    XML that is assigned to a datagrid:

    nikos101 Level 2


      I am working with XML like this that is assigned to a datagrid



          <body>blah blah</body>
          <date>2009-04-28 00:00:00.0</date>

           <body>blah blah2</body>
           <date>2009-04-28 00:00:00.0</date>






      which gets assigned in a function:


      private function xmlLoaded(event:Event):void
                      var s:String=myXML.brief[0].date;
                      var s2:String=myXML.brief;
                      var s3:String=myXML as String;



      s,s1,s3 contain the correct data, however if I attempt the following, s,s1,s3  contain an empty string:


          private function cellDateFormatter(item:Object, column:DataGridColumn):String
                      var s:String=item.brief.date;
                      var s2:String=item.brief;
                      var s3:String=item as String;
                      return dateFormatter.format(new Date(Date.parse(item.brief.date)));


      This is a labelfunction for a datagrid and item is an XML object that is derived from the current row in  datagrid


      Any ideas why is going on?