1 Reply Latest reply on Dec 5, 2008 3:45 PM by rtalton

    Datagrid help

    lou_pace Level 1
      Hi,

      I have an XML file that I've retrieved via the HTTPService and populated an ArrayCollection. I'd like to know how to populate a datagrid control with the data if the XML data looks like this:

      <?xml version="1.0" ?>
      <files count="2" filemask="*.*">
      <folder>c:\watch\hold\ <file>
      <filename>Bob.txt</filename>
      <path>c:\watch\hold\</path>
      <time>2008/10/27 13:27:52</time>
      <size>440634</size>
      </file>
      </folder>
      <folder>c:\watch\hold\joblist\ <file>
      <filename>joblist.xml</filename>
      <path>c:\watch\hold\joblist\</path>
      <time>2008/12/03 15:14:36</time>
      <size>483</size>
      </file>
      </folder>
      </files>

      I'd like to show 4 columns file name, path, time and size. Any help is greatly appreciated!

      thanks
      Lou
        • 1. Re: Datagrid help
          rtalton Level 4
          Depends on the resultFormat property of your HTTPService. The default is object, so...
          In the datagrid's dataprovider property, assign the data returned from the HTTPService:
          dataProvider="{myService.lastResult.folder}"