I have a UI which has a collection of filter definitions via lists, an ArrayCollection of objects to be filtered, a ListCollectionView bound to the ArrayCollection and a filter function which consumes the lists and applies the appropriate filter to the objects. I then have a datagrid which displays the filtered list of objects by binding to the ListCollectionView.
The filtering works fine and as expected, and the ListCollectionView and filter funciton is a very neat way to provide the filtered list with arbitrarily complex filter criteria. However, once the list is filtered I get very strange behaviour in the selection of items in the datagrid. I have multiple selection enabled on my datagrid and double-click so I can hop to a dialog to edit the object. Often when I click a completely different row gets selected. Just as often the very last row in the grid is selected. Quite often nothing at all gets selected. The clicks and double-clicks get fired but there is nothing in the selectedItem variable on the grid. I'm not doing the object selection myself, I am leaving it up to the datagrid to handle it, so I cannot blame bad indexing on my end, it just doesn't seem to work properly. I'm using FlexBuilder 2. Anyone encountered anything like this? I am hoping it is not a bug.