i have one application and two components RolesDatagrid.mxml
---------------------------------- <?xml version="1.0" encoding="utf-8"?> <mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml"<http://www.adobe.com/2006/mxml%22>width="444" height="148"> <mx:Script> <![CDATA[ import mx.core.IFlexDisplayObject; import mx.managers.PopUpManager; //import components.RolesTitleWindow; public function fnAddRoles():void { var var_role_title_window:RolesTitleWindow=RolesTitleWindow(PopUpManager.createPopU p(this,RolesTitleWindow,true)); PopUpManager.centerPopUp(var_role_title_window); } ]]> </mx:Script> <mx:DataGrid x="0" y="0" width="301" height="94"> <mx:columns> <mx:DataGridColumn headerText="RoleName" dataField="col1"/> <mx:DataGridColumn headerText="EmployeeName" dataField="col2"/> <mx:DataGridColumn headerText="Action" dataField="col3"/> </mx:columns> </mx:DataGrid> <mx:Button x="316" y="72" label="AddRoles" click="fnAddRoles()" styleName="buttonNoOfficial" width="95" height="22"/> </mx:Canvas> RolesTitleWindow.mxml -------------------------------------- <?xml version="1.0" encoding="utf-8"?> <mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml"<http://www.adobe.com/2006/mxml%22>layout="absolute" width="400" height="250"> <mx:Script> <![CDATA[ public function fnDivisionRoleName():void { } ]]> </mx:Script> <mx:ArrayCollection id="id_array1"> <mx:String>mahesh</mx:String> <mx:String>suresh</mx:String> <mx:String>babu</mx:String> </mx:ArrayCollection> <mx:ArrayCollection id="id_array2"> <mx:String>Pm</mx:String> <mx:String>Tm</mx:String> <mx:String>ssl</mx:String> </mx:ArrayCollection> <mx:ComboBox id="id_dividion_role_name" x="48" y="77" width="92" dataProvider="{id_array2}"></mx:ComboBox> <mx:ComboBox x="168.5" y="77" width="92" dataProvider="{id_array1}"></mx:ComboBox> <mx:Button x="94" y="127" label="Add" click="fnDivisionRoleName();"/> <mx:Button x="168.5" y="127" label="Cancel"/> </mx:TitleWindow> App.mxml(application) ----------------------------------- <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"<http://www.adobe.com/2006/mxml%22>layout="absolute" xmlns:local="*"> <local:RolesDatagrid /> </mx:Application> This is the code.When ren the application u will get datagrid and addRoles button.wen u click on the addRoles button u will get title window.It contains two comboboxes and add button.My requirement is select values from two comboboxes and click on add button,then the selected combox data will be added to datagrid firstrow(It will contains three fields those are rolename,employeename,action). For example if u select comboboxes items are pm,mahesh then i want the datagrid items are rolename employeename action ------------ ------------------------ ---------------- pm mahesh Edit,delte buttons -- Regards D.Mahesh Babu --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

