Setting the DataGridColumn's dataField based on XML node with the same name

Posted by Rie Mino on Stack Overflow See other posts from Stack Overflow or by Rie Mino
Published on 2010-05-24T22:15:42Z Indexed on 2010/05/24 22:21 UTC
Read the original article Hit count: 308

Filed under:
|
|

I am stuck.

Given this XML:

<matrix>
<row>
    <column>0.51</column>
    <column>0.52</column>
    <column>0.53</column>
    <column>0.54</column>
</row>
<row>
    <column>0.61</column>
    <column>0.62</column>
    <column>0.63</column>
    <column>0.64</column>
</row>

I am trying to define a DataGrid such that the row nodes will represent new rows in the DataGrid and the column nodes will be used to auto-populate the DataGrid's columns. I am having a problem setting the dataField for each of the DataGridColumn ojects created. The DataGrid is created but the cell values for row 1 are all 0.51 and row 2 are 0.61.

What am I doing wrong here?

© Stack Overflow or respective owner

Related posts about Xml

Related posts about flex