chage declaration to [Bindable] public var testArr:ArrayCollection;
On Tue, Nov 17, 2009 at 1:43 AM, Kiran Kumar Vasireddy <[email protected]> wrote: > Hi Pradeep, > > For String and also for arraycollection data binding is not working . You > are getting "Pradeep" string since you initialized it where the variable is > declared , try changing the value to some thing in the function still it > displays "Pradeep" . > > In the following example application is created in the followings steps > > 1) Created text variable and assigned value to it > 2) Created label text and datagrid and assigned values to them > 3) Called initApp, since initApp is called after the data grid is created > you are not getting any values. try calling this method like this > preinitialize="initApp()". You will get whatever you want . > > So no data binding is done here in either case > > Hope you are clear > > regards > Kiran > > On Thu, Nov 12, 2009 at 10:33 PM, pradeepflex <[email protected]> > wrote: >> >> Hello Friends, >> >> Please observe this code >> >> <mx:Script> >> <![CDATA[ >> import mx.collections.ArrayCollection; >> >> private var testArr:ArrayCollection; >> private var text:String = "pradeep"; >> public function initApp():void{ >> >> >> testArr = new >> ArrayCollection([{First:'1',Second:'2',Third:'3'}]); >> } >> ]]> >> </mx:Script> >> <mx:Label text="{text}"/> >> <mx:Text text="{text}" x="69" y="10"/> >> <mx:DataGrid x="30" y="46" dataProvider="{testArr}" >> editable="true"> >> <mx:columns> >> <mx:DataGridColumn headerText="Column 1" >> dataField="First"/> >> <mx:DataGridColumn headerText="Column 2" >> dataField="Second"/> >> <mx:DataGridColumn headerText="Column 3" >> dataField="Third"/> >> </mx:columns> >> </mx:DataGrid> >> >> >> In this code without bindable also the string component can bind the >> value into label and text component. >> >> incase os datagrid it wll not bind and doesn't display the value >> >> Please tel me the bottom lins of this mechanism. >> >> Regards, >> Pradeep. >> >> -- >> >> You received this message because you are subscribed to the Google Groups >> "Flex India Community" group. >> To post to this group, send email to [email protected]. >> To unsubscribe from this group, send email to >> [email protected]. >> For more options, visit this group at >> http://groups.google.com/group/flex_india?hl=. >> >> > > -- > > You received this message because you are subscribed to the Google Groups > "Flex India Community" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/flex_india?hl=. > -- You received this message because you are subscribed to the Google Groups "Flex India Community" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/flex_india?hl=.

