title: Item click event detection in flex datagrid
body: <p>The data grid is defined below with a data provider of xmllist type:</p>
  
  <pre><code>   &lt;mx:columns&gt;         
          &lt;mx:DataGridColumn dataField="ans1" headerText="ans1"/&gt;
          &lt;mx:DataGridColumn dataField="ans2" headerText="ans2"/&gt;
          &lt;mx:DataGridColumn dataField="ans3" headerText="ans3"/&gt;
          &lt;mx:DataGridColumn dataField="ans4" headerText="ans4"/&gt;
      &lt;/mx:columns&gt;
  </code></pre>
  
  <p>On item click event i need to obtain the data(the text) associated to the current column in use. I have tried the following:</p>
  
  <pre><code> private function itemClickEvent(event:ListEvent):void {                
              var selected:String = event.currentTarget.selectedItem;
              debug2.text = selected;
          }
  </code></pre>
  
  <p>But, the debug label text displays the xmllist: </p>
  
  <pre><code>  &lt;question&gt;&lt;ans1&gt;a&lt;/ans1&gt;...&lt;ans4&gt;d&lt;/ans4&gt;&lt;/question&gt;
  </code></pre>