* name of the property in the array element..i,e property of the objects in the array. hope am clear!!
On Apr 17, 6:30 pm, dlo <[email protected]> wrote: > U r clearly missing the dataField property dude!!! > dataField should have value equal to the name of the property in the > array which has to be displayed in the datagrid column. > <mx:columns> > <mx:DataGridColumn headerText="Userid" > id="userid" dataField="userid"/> > <mx:DataGridColumn headerText="User > Name" id="username" dataField"username"/> > </mx:columns> > > On Apr 17, 5:26 pm, rakshith <[email protected]> wrote: > > > > > hi guys..... > > > this is my mxml app'n....i am getting the response as an array into > > the result variable on button click which i checked using the > > debugger.... > > but its not getting displayed on my datagrid.... > > can some help me out with it... > > thanks > > > CODE:::::: > > > <?xml version="1.0" encoding="utf-8"?> > > <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" > > layout="absolute" > > > <mx:DataGrid dataProvider="{dp}" x="254" y="143" width="255" > > enabled="true" id="sandy"> > > <mx:columns> > > <mx:DataGridColumn headerText="Userid" > > id="userid"/> > > <mx:DataGridColumn headerText="User > > Name" id="username"/> > > > </mx:columns> > > </mx:DataGrid> > > > <mx:Script> > > <![CDATA[ > > import mx.collections.ArrayCollection; > > [Bindable] > > public var dp: Array; > > > import flash.net.Responder; > > > public var gateway : RemotingConnection; > > > public function initApplication() > > { > > gateway = new RemotingConnection > > ( "http://localhost/amfphp/ > > gateway.php" ); > > gateway.call( "sample.getUsers", new > > Responder(onResult, > > onFault)); > > } > > > public function onResult( result : Array ) : > > void > > { > > dp = result; > > > } > > > public function onFault( fault : String ) : > > void > > { > > trace( fault ); > > } > > ]]> > > </mx:Script> > > <mx:Button x="127" y="376" label="submit" id="rak" > > enabled="true" > > click="initApplication()"/> > > > </mx:Application>- Hide quoted text - > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ 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=en -~----------~----~----~----~------~----~------~--~---

