title: Flex DataGrid query
body: <p>I need to write the following event.I have a Flex datagrid.When I click on a row I should fetch a particular column and call a remote EJB method.The Flex EJB bridge is working perfectly with BlazeDs.Here are my codes</p>
  
  <pre><code>&lt;mx:DataGrid id="employees" x="100" y="50" dataProvider="{empList}" height="150" click='empHandler();'&gt;
   &lt;mx:columns&gt;
      &lt;mx:DataGridColumn  headerText="empid" dataField="empid" /&gt;   
   &lt;/mx:columns&gt;
  &lt;/mx:DataGrid&gt;
  </code></pre>
  
  <p>My Employee structure empid:Number,firstname,lastname,email,image,password all are Strings.
  The table contains the list of empids.When I select a particular row I hit the EJB method which will return the whole Employee object.I am calling the remote method as follows</p>
  
  <pre><code>&lt;mx:RemoteObject id="srv" showBusyCursor="true" destination="quizAppEJB"
         fault="mx.controls.Alert.show(event.fault.faultString, 'Error')"&gt;
     &lt;mx:method name="checkLogin" result="empList=event.result"
          fault="mx.controls.Alert.show(event.fault.faultString)"&gt;
      &lt;mx:arguments&gt;
      &lt;username&gt;username.text&lt;/username&gt;
      &lt;password&gt;password.text&lt;/password&gt;
      &lt;/mx:arguments&gt;
     &lt;/mx:method&gt;
  </code></pre>
  
  <p>This is my empHandler method.</p>
  
  <pre><code> private function empHandler():void 
      {
      Alert.show('hi');
      srv.getEmployeeDetails(empid);
  
      }
  </code></pre>
  
  <p>I am not sure how to set the empid that is present in the table</p>
  
  <p>
   
      
      username.text
      password.text
      
     </p>
  
  <p>
      
       employees.selectedItem.empid<br>
      
     
     </p>
  
  <p>I want to set the value empDetailList.employee.image as sorce for the image.I am not sure whether I am clear but will clarify if you hv any doubt.</p>