문제

I have a DataGrid with 3 DataGridColumns. All 3 of them have separate dataFields.

I need to get the datafields into an ArrayCollection and pass it to a funciton. I dont want to hard code the ArrayCollection.

Is there any way to achieve this?

도움이 되었습니까?

해결책

Something like this:

var dataFieldCollection : ArrayCollection = new ArrayCollection();
for each (dataGridColumn : DataGridColumn in dataGrid.columns){
 dateFieldCollection.addItem(dataGridColumn.dateField);
}

This is psuedo code I wrote in the browser.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top