xml binding to datagrid


hi,
trying bind xmlfile datagrid. have file name xxxx.xml in folder called assets in application. using xmllistcollection , trying bind datagrid. code
<mx:xml id="sample" source="{assets/xxxx.xml}" />
<mx:xmllistcollection id="samplexml" source="{sample.samplenode}" />

i following error

data binding expressions not supported attributes processed @ compile time.


i think error saying xmllistcollection can't created because compiler doesn't know structure of xml @ compile time (because hasn't finished loading xml file). you'll have listen event , create xmllistcollection, , datagrid if wanted. think 'load' event need, eg. (this untested!)

<mx:xml id="sample" source="{assets/xxxx.xml}" load="createxmllc()" />

<mx:xmllistcollection id="samplexml" />

<mx:script>
<![cdata[

private function createxmllc():void
{
samplexml = new xmllistcollection(sample.samplenode);
}
]]>
</mx:script>


More discussions in Flex (Read Only)


adobe

Comments

Popular posts from this blog

VIDIOC_S_FMT error 16, Device or resource busy - Raspberry Pi Forums

using a laptop skeleton to build a pi laptop - Raspberry Pi Forums

Forum for Joomla? - Joomla! Forum - community, help and support