Hi, 
 I have been using Bindable tag for data providers in datagrid, list
etc. The doc states that this ensures that the destination datagrid
would reflect the change when the dataprovider is changed. But I have
observed that even if I do not use the Bindable tag the datagrid is
still updated when the dataprovider changes. Here is a simple example:

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";
layout="absolute">
        <mx:Script>
        <![CDATA[
        import mx.collections.ArrayCollection;
        /*Bindable tag not added. Flex Builder gives a warning when
the variable is referenced in the datagrid but it still works.*/
        private var dp:ArrayCollection = new ArrayCollection([{index:1,
word:"Test1"},{index:2, word:"Test2"}])
        public function changeDataProvider():void
        {
                var obj1:Object = new Object();
                obj1["index"] = 1;
                obj1["word"] = "Modified Test1";
                dp.setItemAt(obj1,0);
                var obj2:Object = new Object();
                obj2["index"] = 3;
                obj2["word"] = "Test3";
                dp.addItem(obj2); 
        } 
        ]]>
        </mx:Script>    
        <mx:VBox>
                <mx:DataGrid dataProvider="{dp}"/>
                <mx:Button click="changeDataProvider()" label="Change data"/>
        </mx:VBox>                                                      
</mx:Application>
 
In the above example the datagrid changes on the button click. Please
let me know if I am missing somthing.

Reply via email to