开发者

Get column values in flex datagrid

开发者 https://www.devze.com 2022-12-12 08:59 出处:网络
I want to get all values in one of the columns of a datagrid and put them in an array, to use开发者_JS百科 it as a dataprovider of a combobox, is this possible?

I want to get all values in one of the columns of a datagrid and put them in an array, to use开发者_JS百科 it as a dataprovider of a combobox, is this possible?

I use an ArrayCollection as the dataprovider of the datagrid, it's filled from the database.

Thanks


You could do it manually,

var result:ArrayCollection = new ArrayCollection()
for each(var o:Object in myArrayCollection) {
    result.addItem(o.myField)
}

listen for CollectionEvent.COLLECTION_CHANGE on you provider to know when it has been updated.

0

精彩评论

暂无评论...
验证码 换一张
取 消