dcsimg
A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: XML into Datagrid component

  1. #1
    has no job DaveWeaver's Avatar
    Join Date
    Sep 2002
    Location
    London
    Posts
    154

    XML into Datagrid component

    hello, is there a really straight forward way of getting an xml document into the MX datagrid component???

    at the mo, this is what ive been trying:


    myXML = new XML();
    myXML.ignoreWhite = true;
    myXML.load("addresses.xml");

    myXML.onLoad = function(success){
    if (success){
    status_txt.text="Parsing XML";
    Grid.addItem(myXML);
    }else{
    status_txt.text="Error Loading XML";
    }
    }


    What do i need to do???

    P.S, "Grid" = name of datagrid
    "status_txt" = text box to let me know whats going on.

  2. #2
    Senior Member tupps's Avatar
    Join Date
    Jan 2001
    Location
    Melbourne
    Posts
    2,035
    Well I don't know much about the DataGrid component, however I am guessing that it cannot understand the XML data.

    Loop through the XML data (it looks like a bunch of arrays of arrays) and then add the data to the grid as you see fit.

    Thanks

    Luke
    Flash-XML FAQ
    http://www.tupps.com/flash/faq/

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center