开发者

Flex Datagrid Selection

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜