1) I have searched the flexcoders group for an answer
2) I don't find this documented anywhere, but every example of a
datagrid has 2 or more nodes of data

I have a datagrid with a dynamic datasource that contains from 0 to N
elements (they are XML nodes)

It works fine as long as there is more than one node. If there is one
node I can't access the values in that node.

I tested it with a static XML file with the same results. Here is the test:

<mx:Model id="testModel" source="xml/test.xml" />
<mx:DataGrid id="moduleDatagrid" dataProvider="{testModel.message}" />

Here is the XML that works:
<?xml version="1.0" encoding="utf-8"?>
<messages>
    <message>
        <viewdate>test date</viewdate>
    </message>
    <message>
        <viewdate>test date 2</viewdate>
    </message>    
</messages>

but if I modify the XML as follows, I cannot access the data in the
message node:
<?xml version="1.0" encoding="utf-8"?>
<messages>
    <message>
        <viewdate>test date</viewdate>
    </message>
</messages>

I am looking for an elegant way to display data in the datagrid and
wonder if anyone else has come across this


 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to