 
 import spark.components.Grid;
 import spark.components.gridClasses.DefaultGridItemEditor;
+import spark.components.gridClasses.GridSortField;
 
 use namespace mx_internal;
 

                return labelFunction(item);
        }
        
        try 
        {
            var itemData:Object = item;
            for each (var pathElement:String in labelPath)
                itemData = itemData[pathElement];

            if ((itemData != null) && (labelPath.length > 0))
                return itemData.toString();
        }
        catch(ignored:Error) { }
        
        return ERROR_TEXT;
    }
    
    /**

    public function get sortField():SortField
    {
        const column:GridColumn = this;
        const isComplexDataField:Boolean = dataFieldPath.length > 1;
        
        // A complex dataField requires a GridSortField for the DataGrid
        // to reverse a previous sort on this column by matching dataFieldPath
        // to the dataField.
        // TODO (klin): Might be fixed in Spark Sort. The only reason this is
        // required is because MX Sort RTEs when the dataField doesn't exist on the
        // data object even though a sortCompareFunction is defined.
        var sortField:SortField;
        if (isComplexDataField)
        {
            sortField = new GridSortField();
            GridSortField(sortField).dataFieldPath = dataField;
        }
        else
        {
            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 no sortCompareFunction is specified, there are defaults for
            // two special cases: complex dataFields and labelFunctions without dataFields.
            
            if (isComplexDataField)
            {
                // use custom compare function for a complex dataField if one isn't provided.
                cF = function (a:Object, b:Object):int
