0 Replies Latest reply on Dec 23, 2010 5:40 AM by telepara

    while accessing its headerrenderer checkbox in Adv datagrid with the help of keyboard error occurred

    telepara

      i have a advanceddatagrid , while accessing its headerrenderer checkbox with the help of keyboard error occurred saying there is no such property "isSelected" for the object.

      in debug mode it is accepting as keyDown  event of advanceddatagrid in that

       

      actually when i select it with the help of keyboard it is not giving any such errors because it is taking it as click event of headerrenderer checkbox

       

       

       

      <mx:AdvancedDataGrid id="myADG"  keyDown="adgKeyDownHandler(event)"

              keyUp="adgKeyUpHandler(event)"

       

         <mx:columns>

            <mx:AdvancedDataGridColumn headerText="Host" dataField="host_spec" id="ipaddr"/>

            <mx:AdvancedDataGridColumn headerText="Friendly Name" dataField="friendlyname"/>

                     <mx:AdvancedDataGridColumn headerText="Power Control" dataField="powercontrol"/>

             <mx:AdvancedDataGridColumn id="checkboxrenderer" headerText=" " sortable="false" width="25">

        <mx:headerRenderer>

          <mx:Component>

             <mx:HBox paddingLeft="3" paddingTop="1" horizontalAlign="center" verticalAlign="middle" backgroundColor="#171717">

                <mx:CheckBox selected="{outerDocument.isHeaderCheckBoxSelected}" id="checkboxHeader" change="onChange(event);" />

                <mx:Script>

               <![CDATA[

             private function onChange(evt:Event):void {

              if(checkboxHeader.selected) {

              outerDocument.isHeaderCheckBoxSelected = true;

              outerDocument.selectAllHandler();

            } else {

           outerDocument.isHeaderCheckBoxSelected = false;

           outerDocument.selectNoneHandler();

              }

          }

       

          ]]>

         </mx:Script>

        </mx:HBox>

      </mx:Component>

        </mx:headerRenderer>

       

           .....................

      ................................

      ............................

       

       

      please helpme out to solve this problem as soon as possible

       

      thanks in advance