1 Reply Latest reply on Jan 8, 2011 6:05 AM by UbuntuPenguin

    update variable after datagrid edited


      I have 4 variables that are numbers being retrieved and assigned to an arraycollection for a datagrid


      private var myDataProvider:ArrayCollection= new ArrayCollection([{col1:'Approaching headlights', col2:myVar1},

      {col1:'Bright lights in my eyes', col2:myVar2},

      {col1:'Dogs Barking', col2:myVar3},

      {col1:'Fighting with friends', col2:myVar4}]);


      The datagrid (col2) gets sorted in descending order and then the user is able to change the values.  Somehow I need to have the corresponding variable updated if/when a user edits that particular cell.  If I'm on the line with Dogs Barking and edit the value from say," 3" to "5", then myVar3 needs to be updated to "5' as well.  The datagrid could be in any order depending on what values have been assigned to each and I can't find a way to get those variables updated.