0 Replies Latest reply on Apr 24, 2008 7:46 AM by Box2020

    DataGrid, selection and filtering

    Box2020
      Like a lot of developers I've recently moved from Flex 2 to Flex 3. I've noticed a bit of a change in how the DataGrid/List classes deal with multiple selections especially if a filter is applied. As I can't supply the full product I'm working on I've coded a sample that shows the behaviour I'm now experiencing (attached).

      The app displays a combobox filter, a DataGrid and an AdvancedDataGrid. Both grids have the same dataprovider so that I can compair how the two DG's bahave.

      With flex 2 datagrid selecting items then applying a filter would preserve the selected items

      Try the following with a Flex 2 DataGrid-

      1. Select data
      2. Apply filter
      3. Remove filter

      The original selections would be preserved. This feels natural. Now try the same in Flex 3...

      The same cannot be said of DataGrids and AdvancedDataGrids in Flex 3. When the filter is applied the selection is usually lost. Even if it is not lost, when the filter is removed the original selection is always lost, at least partially. The worst part of the problem is that selection change events are not dispatched by the grids.

      I'm just wandering if anyone else has noticed anything like this and if there is a workaround which will give me the functionality that I used to have in Flex 2.