2 Replies Latest reply on Nov 19, 2006 8:48 PM by Meflex

    XML  file and DataGrid

    Meflex
      Hi everyone,

      Plz help me out.....

      Currently, I am working on flex and Remote Object Accessing. My problem is that, in my application I have one Servlet which writes .xml file in browser and I use that .xml file to display data in Datagrid. Everything was woking fine. But then I have to change my .xml file in such a way that one of it's node is a .xml file. like this...

      <?xml version="1.0" encoding="UTF-8" ?>
      - <root>
      - <detail>
      <server>SOA </server>
      <resp_time>250</resp_time>
      - <request>
      <?xml version="1.0" encoding="UTF-8" ?>
      - <envelope>
      <operation>addition</operation>
      </envelope>
      </request>
      </detail>
      </root>

      Here request is one of the node in .xml file. now when i am displaying data in this file into datagrid, datagrid show correct data for <server> and <resp_time> tag. But it shows "[object Object]" for request tag.

      Can any one tell me how can I show that request node into my datagrid ,so that it shows me ..
      <request>
      <?xml version="1.0" encoding="UTF-8" ?>
      - <envelope>
      <operation>addition</operation>
      </envelope>
      </request>
      instead of [object Object] ???? Please Hepl me
        • 1. Re:  XML  file and DataGrid
          ntsiii Level 3
          First, you are really posting in the wrong forum. This one is for Flex Builder 2, an IDE/code editor. You question is about the language Flex, and such questions should go in the "General Discussion" forum.

          Try using a labelFunction instead of dataField.

          private function lfRequest(oItem:Object, dgc:DataGridColumn):String
          return oItem.request.toXMLString()
          ...

          Tracy
          • 2. Re:  XML  file and DataGrid
            Meflex Level 1
            I am Sorry Tracy. I am new to this Forum. I will not commit such mistake again. I am sorry. Thanks for your reply.

            meflex