2 Replies Latest reply on Jun 14, 2009 11:15 PM by aruvasavi

    How to accessing item renderers in action script??

    aruvasavi Level 1



      I am working on itemrenderes in Flex!

      I have link button component as item renderer inside one of the data grid column, please find my piece as below!

      Now how do we make that item render invisible once we click on it!

      We need to make that link button invisible to the user!

      Let me know how to access like this!


      public function onClick():void {

                  // we use our custom component as the template for the popup window

                  var confirmWindow:TitleWindow = TitleWindow(PopUpManager.createPopUp(this, ConfirmationPopUp, true));


                  // you will only need to take care of the yes response since you don't have to do anything

                  // if the response was a no

                  confirmWindow.addEventListener("selectedYes", function():void {  

                              //Alert.show("Can be Upgraded to an Alarm");




                  confirmWindow.addEventListener("selectedNo", function():void {         




              public function upGradeEventToAnAlarm():void


                  eventRO = new RemoteObject();                  

                        eventRO.destination = "eventBrowser";


                        eventRO.addEventListener("fault", getFaultHandler);




              private function getResultHandler(event:ResultEvent):void



                        if(event.result == true)


                         Here I need to access the link button which is clicked and need to make invisible


      Alert.show("Successfully  Upgraded to an alarm");




                              Alert.show("Cannot be Upgraded to an alarm");  




                  //Fault Handler.             

                  private function getFaultHandler(event:FaultEvent):void 


                        Alert.show(event.fault.faultString, 'Error');





            <mx:TabNavigator x="24" y="25" width="95%" height="90%"

                  styleName="MyTabNavigator" horizontalGap="-20"  backgroundColor="#e6e4e5">

                  <mx:Canvas label="View" width="100%" height="100%" >

                        <mx:DataGrid id="eventsDataGrid" dataProvider="{myModel.eventsList}"

                               height="90%" width="98%" x="10" y="23" >


                        <!--  <mx:DataGridColumn  id="iconFlagID" headerText="IconFlag"

                                    dataField="iconFlag" visible="false"/>-->

                              <mx:DataGridColumn  headerText="EventID" dataField="id" visible="false"/>

                              <mx:DataGridColumn  headerText="Event Name" dataField="eventName"/>

                              <mx:DataGridColumn  id="catFieldId" headerText="Category"


                              <mx:DataGridColumn  headerText="AlarmName" dataField="alarmName"/>

                              <mx:DataGridColumn  headerText="Severity" dataField="severity"/>

                              <mx:DataGridColumn  headerText="Source" dataField="source"/>

                              <mx:DataGridColumn  headerText="Updated Time" dataField="updateTime"/>

                              <mx:DataGridColumn  headerText="Description" dataField="description"/>

                              <mx:DataGridColumn  id="upgradeLinkButtonId

                                    headerText="Upgrade To Alarm" dataField="iconFlag">                          



                      <mx:Box height="100%" width="100%">               

                      <mx:LinkButton id="eventsLinkButtonID" textDecoration="underline"


                                    click="outerDocument.onClick();" visible="{!data.iconFlag}"

                                    textAlign="center" includeInLayout="true">










      Thanks in advance