0 Replies Latest reply on Sep 16, 2008 1:36 PM by JasonMH

    DataGrid CollectionEvent Weirdness

    JasonMH
      I have a DataGrid with a dataProvider that is an ArrayCollection of objects (lets say Widget). The Widget class is marked as [Bindable]

      I add a listener to my dataProvider for CollectionEvent.COLLECTION_CHANGE. This event is fired every time the data is changed in the grid, however if I sort by a column, clicking (with or without changing) any value in that column will throw a change event for every row in the DataGrid.

      I was previously checking for oldValue == newValue to determine whether the record has actually changed. However, when the column is sorted, oldValue and newValue are sometimes (but not always) null. I've tried to figure out a way to see why it happens, but it seems almost random. Basically, the result is that it's not possible to tell when a record has been updated or not.

      Thanks for any help on this, I can post source code if necessary.