Setting the DataGridColumn's dataField based on XML node with the same name
- by Rie Mino
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?