title: as3 datagrid column sort with special function
body: <p>Im using datagrid component in an AS3 air project. I get datas from sql by php and include into datagrid. My problem is I want to change the sorting methods. For example, when you work with Arrays you can sort the arrays with special functions.. <strong>For example; arrayName.sort(functionName)</strong></p>
  
  <p>How can I use this func in a specific datagrid columns : </p>
  
  <pre><code>function orderLastName(a, b):int 
  { 
      var lastName:RegExp = /\b\S+$/; 
      var name1 = a.match(lastName); 
      var name2 = b.match(lastName); 
  
      if (name1 &lt; name2) 
      { 
          return -1; 
      } 
      else if (name1 &gt; name2) 
      { 
          return 1; 
      } 
      else 
      { 
          return 0; 
      } 
  } 
  </code></pre>