Consider the following when using the binding feature:
myGrid.getItemAt(itemIndex).myField = 1;
You would use the following:
myGrid.dataProvider.editField(itemIndex, "myField", 1);
In some situations, data binding may not appear to function correctly, and you may need to debug them. The following list contains suggestions for resolving data binding issues:
It is easy to see a warning and think that it doesn't matter, especially if binding appears to work at startup, but warnings are important.
If a warning is about a missing [Bindable] on a getter/setter property, even if the binding works at startup, subsequent changes to the property are not noticed.
If a warning is about a static variable or a built-in property, changes aren't noticed.
When your source is part of a larger procedure, it is easy to miss the fact that you never assigned the source.
You can use the Flex command-line debugger (fdb), or the Adobe® Flex® Builder™ debugger to make sure that the dispatchEvent() method is called. Also, you can add a normal event listener to that class to make sure it gets called. If you want to add the event listener as a tag attribute, you must place the [Event('myEvent')] metadata at the top of your class definition or in an <mx:Metadata> tag in your MXML.
You can then put a trace or an alert or some other debugging code in the setter with the value that is being assigned. This technique ensures that the binding itself is working. If the setter is called with the right information, you will know that it's your destination that is failing, and you can start debugging there.