And here is how I did it.
private function setHeaderTexts():void {
var i:Number = 0;
var columns:ArrayCollection =new ArrayCollection(datagrid.columns);
for each (var column:DataGridColumn in columns) {
column.headerText = tempArrayCollection.getItemAt(i).toString();
//tempArrayCollection is where I store the list of headers from the XML
i++;
}
datagrid.invalidateDisplayList();
}
Hope it helps!

No comments:
Post a Comment