0
votes

I have a Datagrid that is being populated by an ArrayCollection (rows) of Arrays (columns). I need to update the headerText of each column based on a List that will correspond with the total number of items within each array in the arraycollection.

What is the best way of doing this?

I know that I can set a listener in the List and update the headerText using (matrixDatagrid.columns[i] as DataGridColumn).headerText but I am looking for a cleaner solution.

Is there a way to do this using an itemRenderer in the Datagrid?

1

1 Answers

1
votes

Adobe has a write up on Passing values to headerrenderer that has an example on how to dynamically pass data to your HeaderRenderer. Hopefully it helps. :)