After using a DataGridEvent with an editable GridItem in a
DataGrid, the selectedIndex cannot be changed from -1 by user
interaction. The highlight moves, but the selectedIndex remains at
-1 or whatever it has been set to in the program.
You're right the problem was linked to the binding. I was
using the Bindable metatag, but after I got rid of this and set up
my own change listener, this problem disappeared.
I then had the problem that at least the item_edit_end and
the item_focus_out events fire twice after you trigger the event
once, and depending on the code this can cause problems; at one
time something I had caused the event to trigger endlessly crashing
the computer when the memory ran out.
Setting a counter to 0 and then in the handler: counter++ and
only running any code after the event when counter%2 is true,
solves all the problems and everything now works correctly.
I am nervous though that there could be a bug somewhere in
the Flex code which if it eventually gets fixed will make my code
fail sometime in the future.