actionscript 3 - Populating a Datagrid with variable number of columns and rows in Flex -


I am trying to figure out how to manage a datagrid based on an XML object:

  & lt; Matrix rows = "5" column = "5" & gt; & Lt; Column & gt; & Lt; Line & gt; 0.5 & lt; / Row & gt; & Lt; Line & gt; 0.21 & lt; / Row & gt; & Lt; / Column & gt; & Lt; Column & gt; & Lt; Line & gt; 0.6 & lt; / Row & gt; & Lt; Line & gt; 0.9 & lt; / Row & gt; & Lt; / Column & gt; & Lt; Column & gt; & Lt; Line & gt; 0.5 & lt; / Row & gt; & Lt; Line & gt; 0.5 & lt; / Row & gt; & Lt; / Column & gt; & Lt; Column & gt; & Lt; Line & gt; 0.8 & lt; / Row & gt; & Lt; Line & gt; 0.4 & lt; / Row & gt; & Lt; / Column & gt; & Lt; / Matrix & gt;  

I have to populate the datagrid column names based on a different XML object and to use the above XML to populate the rows of each column. I am currently able to create a datagrid and populate my column headers but how do I make sure how to add rows for each column. The above XML updates and updates will be updated with the new row and column elements removed. This, of course, will be bound to the datagrid to show updates.

Is it necessary that the row data is the child of the columns? If this is the case then you will first need to change the data. Datagrid in Flex and Tablet in HTML are based on database conferences with rows as separate records, not columns.

If / which is providing data, refuses to comply with this, you will be better not to manipulate data instead of visual control, which you are currently doing .


Comments