             
             // clearing the gridDimensions resets rowCount
             gridDimensions.rowCount = _dataProvider ? _dataProvider.length : 0;
-            gridDimensions.columnCount = _columns ? _columns.length : 0;
         }
         
         // Reset content size so scroller's viewport can be resized.  There

                break;
            }                                
        }
        
        gridDimensions.columnCount = _columns.length;
        
        if (gridLayout)
            gridLayout.columnsCollectionChanged(event);

                gridSelection.removeAll();
                gridSelection.requireSelection = savedRequireSelection;
            }

           // make sure we have the right number of columns.
           gridDimensions.columnCount = _columns ? _columns.length : 0;
           clearGridLayoutCache(columnsChanged);
            
            if (!caretChanged)
                initializeCaretPosition();
