         if (!sortableColumns
             || isNaN(event.columnIndex) 
             || event.columnIndex == -1 
-            || !columns[event.columnIndex].sortable)
+            || !_columns[event.columnIndex].sortable)
             return;
 
         if(columnGrouping)

            if(isNaN(columnNumber) ||  columnNumber == -1)
                return;

            var headerInfo:AdvancedDataGridHeaderInfo = getHeaderInfo(columns[columnNumber]);
            //If this is a leaf column and doesn't get data directly from the data row, but through internalLabelFunction
            if(headerInfo.internalLabelFunction != null)
                event.dataField = null;


        // If column becomes hidden, invalidate anchor, highlight and selected indices.
        {
            if (anchorColumnIndex != -1 && _columns[anchorColumnIndex].visible == false)
                anchorColumnIndex = -1;
            if (highlightColumnIndex != -1 && _columns[highlightColumnIndex].visible == false)
                highlightColumnIndex = -1;
            if (selectedColumnIndex != -1 && _columns[selectedColumnIndex].visible == false)
                selectedColumnIndex = -1;
        }
    }
