title: How to Select All checkboxes in Flex Item Renderer?
body: <p>I am stuck at a point where I need to select all check boxes of the Item Renderer.</p>
  
  <p>I have a <strong>Select All</strong> button on whose click my all check boxes needs to get selected. Is it possible to do in Flex item renderer.</p>
  
  <p>Below is my code for item renderer:</p>
  
  <p>
  
  <pre><code>                          rowCount="2" columnCount="5" dragEnabled="false" dragMoveEnabled="false" height="100%"  width="100%" verticalScrollPolicy="on" verticalScrollPosition="0" selectable="false"&gt;
  
  
  
  &lt;mx:itemRenderer&gt;
  
                          &lt;fx:Component&gt;
  
                              &lt;!--&lt;mx:VBox height="100%" width="100%" verticalGap="0"&gt;--&gt;
  
  
                              &lt;mx:VBox width="175" height="200" verticalGap="0" verticalScrollPolicy="off" horizontalScrollPolicy="off" &gt;
  
                                  &lt;fx:Script&gt;
  
                                      &lt;![CDATA[
                                          import mx.collections.ArrayCollection;
                                          import mx.controls.Alert;
                                          import mx.controls.List;
                                          import mx.core.FlexGlobals;
                                          import mx.utils.ObjectUtil;
  
                                          [Bindable]   
  
                                          public var productData:Array = new Array();
  
                                          import mx.collections.ArrayCollection;
                                          import mx.controls.listClasses.BaseListData;
                                          private var _listData:BaseListData;
                                          private var _tileList:List;
                                          [Bindable("dataChange")]
                                          public function get listData():BaseListData
                                          {
                                              return _listData;
                                          }
                                          public function set listData(value:BaseListData):void
                                          {
                                              _listData = value;
                                              _tileList = value.owner as List;
                                          }
                                          override public function set data(value:Object):void
                                          {
                                              super.data = value;
                                              checkFileToDownload.selected = value["isSelected"];
                                          }
                                          private function onChange(event:Event):void
                                          {
                                              data["isSelected"] = checkFileToDownload.selected;
                                              FlexGlobals.topLevelApplication.checkFileToDownload(event); 
                                          }
  
  
                                          /* protected function checkSelectedFile(event:MouseEvent):void
                                          {
                                              // TODO Auto-generated method stub
  
                                                  checkFileToDownload.selected = true;
  
                                                  FlexGlobals.topLevelApplication.generateDownloadFileArray("push",checkFileToDownload.name,checkFileToDownload.automationName);
                                                  outerDocument.downloadButtonStatus(event)
  
  
                                          } */
  
                                      ]]&gt;
  
                                  &lt;/fx:Script&gt;
  
                                  &lt;mx:HBox id="currentTileElement"&gt;
  
                                      &lt;s:CheckBox id="checkFileToDownload" name="{data.itemUrl}"  automationName="{data.contentId}"
                                                  change="{onChange(event)}"
                                                  skinClass="com.skinClass.CustomCheckBoxSkin" click="{outerDocument.downloadButtonStatus(event)}"/&gt;
  
                                      &lt;mx:TextArea wordWrap="true" fontWeight="bold" text="{data.title}" borderStyle="none"  verticalScrollPolicy="off" 
  
                                                   horizontalScrollPolicy="off" textAlign="left" editable="false"/&gt;
  
  
                                  &lt;/mx:HBox&gt;
  
                                  &lt;mx:HBox&gt;
  
                                      &lt;mx:Image  source="{'/assets/'+data.contentId.substring(1, 2)+'.png'}" maintainAspectRatio="true"/&gt;
  
                                      &lt;mx:Image id="tileListImageSource" width="150" height="75" maintainAspectRatio="false"
  
                                                source="{data.localActualPath}"/&gt;
  
                                  &lt;/mx:HBox&gt;
  
  
                              &lt;!--    &lt;mx:HBox  horizontalGap="0"&gt;
  
                                      &lt;mx:Repeater id="itemCategory" dataProvider="{data.category.split('|')}"&gt;
  
                                          &lt;mx:Text textAlign="left"  text="{itemCategory.currentItem}"  color="#FF9900" fontWeight="bold"  fontSize="9"  /&gt;
  
                                      &lt;/mx:Repeater&gt;
  
                                  &lt;/mx:HBox&gt; --&gt;
  
  
                                  &lt;mx:VBox  horizontalGap="0" width="100%" verticalGap="0" paddingLeft="25"&gt;
                                      &lt;s:Spacer height="2"/&gt;
  
                                      &lt;mx:TextArea text="{data.author.split('|')}" color="#FF9900" fontWeight="bold" chromeColor="white" height="40" editable="false" wordWrap="true" borderStyle="none" verticalScrollPolicy="on" horizontalScrollPolicy="off" textAlign="left"/&gt;
                                      &lt;!-- &lt;mx:Repeater id="authorCategory" dataProvider="{data.author.split('|')}"&gt;
                                          &lt;mx:Text textAlign="left" fontSize="11" fontSharpness="400" fontWeight="bold" color="#FF9900"   text="{authorCategory.currentItem}"/&gt;
                                      &lt;/mx:Repeater&gt; --&gt;
                                      &lt;s:Spacer height="2"/&gt;
                                      &lt;mx:Text fontSize="11" text="{data.publishedDate}"/&gt;
                                      &lt;s:Spacer height="2"/&gt;
                                      &lt;mx:HBox horizontalGap="0" verticalGap="0"&gt;
                                          &lt;mx:Text fontWeight="bold" fontSize="10" text="File Size: " paddingRight="0"/&gt;&lt;mx:Text fontSize="10" color="red" paddingLeft="0" fontWeight="bold" text="{data.itemSize}MB"/&gt;   
                                      &lt;/mx:HBox&gt;
                                  &lt;/mx:VBox&gt;
                              &lt;/mx:VBox&gt;
  
  
                          &lt;/fx:Component&gt;
  
                      &lt;/mx:itemRenderer&gt;
  
                  &lt;/mx:TileList&gt;
  </code></pre>
  
  <p>Any help is appreciated.</p>
  
  <p>Thanks,
  Ankit Tanna.</p>