     {
         const nCols:int = (columnCountOverride == -1) ? _columnCount : columnCountOverride;
         var contentWidth:Number = 0;
-        
-        for (var columnIndex:int = 0; columnIndex < nCols; columnIndex++)
-        {
+        var measuredColCount:int = 0;
+        
+        for (var columnIndex:int = 0; (columnIndex < _columnCount) && (measuredColCount < nCols); columnIndex++)
+        {
+            // column.visible==false columns will have a typicalCellWidth of 0, so skip them.
             var width:Number = columnIndex < _columnCount ? typicalCellWidths[columnIndex] : NaN;
-            contentWidth += isNaN(width) ? 0 : width;
+            if (width == 0)
+                continue;
+            
+            if (isNaN(width))
+                width = defaultColumnWidth;
+            
+            contentWidth += width;
+            measuredColCount++;
         }
         
         if (nCols > 1)
-            contentWidth += (nCols - 1) * columnGap;
+            contentWidth += (measuredColCount - 1) * columnGap;
 
         return contentWidth;
     }

     *  Returns the X coordinate of the origin of the specified cell.
     */
    public function getCellX(row:int, col:int):Number
    {
        if (!_columnWidths)
            return col * (defaultColumnWidth + columnGap);
        
        var x:Number = 0;
        
        for (var i:int = 0; i < col; i++)
        {
            var temp:Number = _columnWidths[i];
            
            if (isNaN(temp))
                x += defaultColumnWidth + columnGap;
            else
                x += temp + columnGap;
        }
        
        return x;

     */
    public function getColumnIndexAt(x:Number, y:Number):int
    {
        var cur:Number = x;
        var i:int;
        
