0 Replies Latest reply on Mar 8, 2010 8:38 AM by venkatsyss

    Regarding - Amfphp

    venkatsyss Level 1



      i am using amfphp to display the records in the datagrid in flex.


      My question is ,while i have calling a function in it needs to select all the checkbox in the datagrid.



      The Follwing code shows:




      <mx:DataGrid id="myDg">
          <mx:DataGridColumn dataField="selected">
                      <mx:CheckBox selected="{data.sel}"></mx:CheckBox>
          <mx:DataGridColumn dataField="emp_name"></mx:DataGridColumn>
          <mx:DataGridColumn dataField="emp_email"></mx:DataGridColumn>
          <mx:DataGridColumn dataField="emp_state"></mx:DataGridColumn>




      <mx:RemoteObject id="myService" destination="AMFPHP" source="echoService" endpoint="http://localhost/amfphp/gateway.php">
              <mx:method name="selectAll" result="Result()">






      <mx:Button label="sample" click="handleSelect(true)"></mx:Button>




      private function handleSelect(value:Boolean):void{
                      var len:int=myService.selectAll.lastResult.length;
                      for(var i:int=0 ; i<len;i++ ){


      But i could not able to check all the checkbox in a datagrid.



      i could n't know how to solve the problem.


      please find me the solution to solve the problem.




      Thanks and Regards,