Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 03-27-2008, 08:47 PM   #1
dave84
Registered User
 
Join Date: Mar 2008
Posts: 7
Default graphML as dataProvider in Data Grid

Hello!

I'm currently trying to take information from a database, format it into graphML, and then display it in a Data Grid. Unfortunately, the data will not show -- I have tried dot operators, @, and anything else I can think of to insert into the dataField attribute. The only way ANYTHING will populate is if I insert 'node' into the dataField -- for example:

<mxataGridColumn dataField="node" headerText="Name"/>

The result set that I am returning from the .as file is as follows:
myResult2 = event.result as XMLList;

I have tried event.result.graph as well - I think this is the way to go.

Trace statements have verified that my graphML [in myResult2] is formatted correctly. Here is what it looks like:

Code:
<graphml>
  <key id="name" for="node" attr.name="name" attr.type="string">
    <default>unknown</default>
  </key>
  <key id="type" for="node" attr.name="type" attr.type="string">
    <default>unknown</default>
  </key>
  <key id="routeprefix" for="node" attr.name="routeprefix" attr.type="string">
    <default>unknown</default>
  </key>
  <key id="association" for="edge" attr.name="association" attr.type="string"/>
  <graph id="A" edgedefault="undirected">
    <node id="21043">
      <data key="name">test</data>
      <data key="type">AS</data>
      <data key="routeprefix">217.20.50.0</data>
    </node>
    <node id="6697">
      <data key="name"/>
      <data key="type">AS</data>
      <data key="routeprefix"/>
    </node>
    <node id="1239">
      <data key="name"/>
      <data key="type">AS</data>
      <data key="routeprefix"/>
    </node>
    <edge source="6697" target="21043"/>
    <edge source="21043" target="1239"/>
    <node id="20965">
      <data key="name"/>
      <data key="type">AS</data>
      <data key="routeprefix"/>
    </node>
    <node id="1930">
      <data key="name"/>
      <data key="type">AS</data>
      <data key="routeprefix"/>
    </node>
    <edge source="20965" target="21043"/>
    <edge source="21043" target="1930"/>
    <node id="1239">
      <data key="name"/>
      <data key="type">AS</data>
      <data key="routeprefix"/>
    </node>
    <node id="2497">
      <data key="name"/>
      <data key="type">AS</data>
      <data key="routeprefix"/>
    </node>
    <edge source="1239" target="21043"/>
    <edge source="21043" target="2497"/>
    <node id="35422">
      <data key="name"/>
      <data key="type">AS</data>
      <data key="routeprefix"/>
    </node>
    <node id="3216">
      <data key="name"/>
      <data key="type">AS</data>
      <data key="routeprefix"/>
    </node>
    <edge source="35422" target="21043"/>
    <edge source="21043" target="3216"/>
    <node id="1239">
      <data key="name"/>
      <data key="type">AS</data>
      <data key="routeprefix"/>
    </node>
    <node id="3257">
      <data key="name"/>
      <data key="type">AS</data>
      <data key="routeprefix"/>
    </node>
    <edge source="1239" target="21043"/>
    <edge source="21043" target="3257"/>
    <node id="6320">
      <data key="name"/>
      <data key="type">AS</data>
      <data key="routeprefix"/>
    </node>
    <node id="3333">
      <data key="name"/>
      <data key="type">AS</data>
      <data key="routeprefix"/>
    </node>
    <edge source="6320" target="21043"/>
    <edge source="21043" target="3333"/>
    <node id="8342">
      <data key="name"/>
      <data key="type">AS</data>
      <data key="routeprefix"/>
    </node>
    <node id="3356">
      <data key="name"/>
      <data key="type">AS</data>
      <data key="routeprefix"/>
    </node>
    <edge source="8342" target="21043"/>
    <edge source="21043" target="3356"/>
    <node id="3216">
      <data key="name"/>
      <data key="type">AS</data>
      <data key="routeprefix"/>
    </node>
    <node id="3549">
      <data key="name"/>
      <data key="type">AS</data>
      <data key="routeprefix"/>
    </node>
    <edge source="3216" target="21043"/>
    <edge source="21043" target="3549"/>
    <node id="6854">
      <data key="name"/>
      <data key="type">AS</data>
      <data key="routeprefix"/>
    </node>
    <node id="3741">
      <data key="name"/>
      <data key="type">AS</data>
      <data key="routeprefix"/>
    </node>
    <edge source="6854" target="21043"/>
    <edge source="21043" target="3741"/>
  </graph>
</graphml>
Any thoughts as to how to make the data appear in the Data Grid? Is there something wrong with the way the graphML is formatted?

Thanks in advance!!!
dave84 is offline   Reply With Quote
Old 03-27-2008, 09:43 PM   #2
allenrabinovich
Omniheurist
 
Join Date: Mar 2008
Posts: 35
Default

Specifically which data from this xml file do you want to display in the DataGrid? Name, type and routeprefix for all nodes? Or something else?
allenrabinovich is offline   Reply With Quote
Old 03-27-2008, 11:05 PM   #3
dave84
Registered User
 
Join Date: Mar 2008
Posts: 7
Default

Ideally, everything.

ID, name, route prefix, and each edge source and target.
dave84 is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Partially editable data grid? handycam Flex 2, 3 & 4 3 07-15-2007 07:00 PM
passing radio button variables/values acperez ActionScript 1.0 (and below) 10 03-17-2006 12:20 PM
XML Data Grid With Double Click sarma.o Components 0 01-16-2006 06:44 AM
having problems populating my data grid slaw_dawg Components 0 02-03-2005 02:54 AM
is it possible to populate a data grid with data loaded from php? slaw_dawg ActionScript 2.0 11 01-31-2005 05:50 PM


All times are GMT. The time now is 03:44 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.