2 Replies Latest reply on Aug 12, 2010 11:45 PM by kvpdy

    How to recall the same page from actionscript

    kvpdy

      I have a dropdown in a grid itemrenderer . i have set the selected value of a drop down in creationComplete method. But If i load the grid at second time the selected value of the dropdown changed because creationComplete method is not calling. Can anybody give a solution to reload the selecteditem for the dropdown in the grid. Its urgent.

       

      Thanks & Regards

      KVPDY

        • 1. Re: How to recall the same page from actionscript
          flex4 Level 2

          Hi

           

                       If my understand is correct u are using creationComplete event in application ....

           

           

           

                               Once application loads the creation complete event will fire and the grid will update... if u want to reload the grid u need to recall the event listener of that event...

           

                               better use event listener for that creation complete event and u recall that eventlistener externally  ,, hope this will help u.. if u dont mind please send me the peace of ur code so that i will send u the exact approach

          • 2. Re: How to recall the same page from actionscript
            kvpdy Level 1

            <mx:DataGridColumn  headerText="Employee ID"  dataField="empId" rendererIsEditor="true">

             

                                <mx:itemRenderer >

             

                                    <fx:Component>

             

                                        <mx:HBox textAlign="center">

             

                                            <fx:Script>

             

                                                <![CDATA[

             

                                                    import org.xchg.utils.DropDownList;

             

                                                ]]>

             

                                            </fx:Script>

             

                                            <mx:Spacer width="5"/>

             

                                            <s:MXItemRenderer>

             

                                                <s:DropDownList requireSelection="true" id="userNamesGroupDD"  width="200" dataProvider="{outerDocument.userGroups}"

             

                                                                creationComplete="{DropDownList.getDropDownSelectedIndex(data.empId,outerDocument.userGro ups)}" 

             

                                                                change="{data.EmpId= userNamesGroupDD.selectedItem.value}"/>

             

                                            </s:MXItemRenderer>

             

                                        </mx:HBox>

             

             

             

                                    </fx:Component>

             

                                </mx:itemRenderer>

             

                            </mx:DataGridColumn>

             

             

            this is my code.Pls give me a solution