开发者

Flex Datagrid Selection

开发者 https://www.devze.com 2023-04-12 20:38 出处:网络
I have a dataGrid in Flex to which data is added dynamically using dataGrid1.dataProvider=myArrayCollection;

I have a dataGrid in Flex to which data is added dynamically using

dataGrid1.dataProvider=myArrayCollection;

The DataGrid is non-editable and defined in mxml as

<mx:DataGrid id="dataGrid1" selectable="true">
    <!--columns go in her开发者_高级运维e, removed for stackoverflow post -->
</mx:DataGrid>

The data in myArrayCollection definitely does not contain duplicates.

My problem: I am not able to select any row except the last.

This occurs when I overlay the AIR 3 SDK on my copy of Flex


It seems that the code breaks when the objects in the arrayCollection are complex objects. I have posted a bug report on Adobe's site here. The workaround: make a simple wrapper class with only 1 property: the actual object. This will make the selection work again, though you will have quite some reworking of code to do

0

精彩评论

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

关注公众号