2 Replies Latest reply on Jun 11, 2010 1:21 PM by vmvmvmvmvm

    Implementation for two itemrenders inside a datagrid talking to each other

    vaishalishah

      Hi ,

          I have a datagrid as with itemrenders as a checkbox and textarea. I want an implementation that when the check box is toggle the text in the textarea should change. How do i access the text area componet inside the script tag of the checkbox as both are renderers inside the datagrid. Any help would be appreciated.

       

       

      <controls:CustomDataGrid x="0" y="267" height="471" width="100%"   id="balanceDetailGrid" >
              <controls:columns>
                  <mx:DataGridColumn headerText="Select" draggable="false">               
                      <mx:itemRenderer>
                          <mx:Component>
                              <mx:VBox>
                                  <mx:Script>
                                      <![CDATA[
                                          override public function set data(data:Object):void{
                                              if(data != null){
                                                  var checked:Boolean = false;
                                                  var strMandoryCd:String = data.bdl_text_mand_cd as String;
                                                  var strcbsStatusCd:String = data.cbs_status_cd  as String;
                                                  if( strMandoryCd!= null){
                                                      if(((strMandoryCd) == "Y")
                                                          || ((strMandoryCd) == "y")){
                                                          chkBlankItem.selected = false;                   
                                                      }
                                                 
                                                      else if(strcbsStatusCd != null){
                                                          if((strcbsStatusCd == "A")
                                                              ||(strcbsStatusCd == "a")){
                                                              chkBlankItem.selected = true;                           
                                                          }
                                                          else{
                                                              chkBlankItem.selected = false
                                                          }
                                                      }
                                                  }
                                                  else{
                                                      chkBlankItem.selected = false
                                                  }
                                              }
                                          }
                                      ]]>
                                  </mx:Script>
                                     
                                 
                                  <mx:CheckBox id="chkBlankItem" paddingLeft="80"/>
                              </mx:VBox>
                              </mx:Component>
                      </mx:itemRenderer>
                  </mx:DataGridColumn>
                             <mx:DataGridColumn headerText="Bold" draggable="false">
                      <mx:itemRenderer>
                          <mx:Component>
                              <mx:CheckBox  selected="{outerDocument.setLineType(data)}" paddingLeft="80"/>
                          </mx:Component>
                      </mx:itemRenderer>
                  </mx:DataGridColumn>