     //----------------------------------
     
     /**
-     *  Returns a SortField that can
-     *  be used to sort a collection by this column's dataField.
+     *  Returns a SortField that can be used to sort a collection by this
+     *  column's <code>dataField</code>.
      *  
-     *  <p>If the <code>sortCompareFunction</code> property is defined, 
-     *  it assigns the SortField's compare function to a closure around 
-     *  the <code>sortCompareFunction</code> that uses the right signature 
+     *  <p>If the <code>sortCompareFunction</code> property is defined,
+     *  the SortField's compare function is assigned to a closure around
+     *  the <code>sortCompareFunction</code> that uses the right signature
      *  for the SortField and captures this column.</p>
      * 
+     *  <p>If the <code>sortCompareFunction</code> property is not defined
+     *  and the <code>dataField</code> is complex, then the SortField's
+     *  compare function is assigned to a closure around a default compare
+     *  function that handles the complex <code>dataField</code>.</p>
+     *
      *  <p>If the <code>sortCompareFunction</code> and 
      *  <code>dataField</code> properties are not defined, but the
      *  <code>labelFunction</code> property is defined, then it assigns the 
      *  <code>compareFunction</code> to a closure that does a basic string compare 
      *  on the <code>labelFunction</code> applied to the data objects.</p>
-     * 
+     *  
      *  @langversion 3.0
      *  @playerversion Flash 10
      *  @playerversion AIR 2.5

    public function get sortField():SortField
    {
        const column:GridColumn = this;
        const sortField:SortField = new SortField(dataField);
        var cF:Function = null;
        
        if (_sortCompareFunction != null)
        {
            cF = function (a:Object, b:Object):int
            { 
                return _sortCompareFunction(a, b, column);
            };       
        }
        else
        {
            if (dataFieldPath.length > 1)
            {
                // use custom compare function for a complex dataField if one isn't provided.
                cF = function (a:Object, b:Object):int


import spark.components.Grid;
import spark.components.gridClasses.DefaultGridItemEditor;
import spark.components.gridClasses.GridSortField;

use namespace mx_internal;

