Thanks for this. Although, I am looking at something that I would get the items in the selected datagrid, store the same into variables and then set those variable values into the form field.
I am still trying your codes out. Regards. ________________________________ From: markgoldin_2000 <[email protected]> To: [email protected] Sent: Wednesday, 20 May, 2009 20:41:33 Subject: [flexcoders] Re: Master-Detail Datagrid and Form There are other ways but here what I am doing: <mx:FormItem width="100%" direction="horizont al" label="First Name" required="true" > <mx:TextInput id="firstname" focusOut="formatNam es(firstname) " text="{badgelist. selectedIndex= =-1 ? XML(badgelist. dataProvider. getItemAt( 0)).firstname : XML(badgelist. dataProvider. getItemAt( badgelist. selectedIndex) ).firstname} " width="100" restrict="A- z"/> </mx:FormItem> where badgelist is my DataGrid. When form loads DG has first row highlighted and first row is detailed. Then everytime you change selection you get new details shown. Not sure if my code is the one to learn from but the approach works very well for me. HTH --- In flexcod...@yahoogro ups.com, Angelo Anolin <angelo_anolin@ ...> wrote: > > > Hi. I am looking for a simple application where a datagrid is displayed. > When the user clicks on the datagrid, the selected item's details is > populated in a form element. > > I have no problem setting up the datagrid and populating it with XML data. > > I know that I need to map the itemClick event in the datagrid but since I am > starting with Flex, I am not sure what kind of command to map to achieve > this.. > > Any sample codes would be extremely helpful. Thanks. > > Kind regards, > > Angelo >

