                 break;
             }                                
         }
-        
-        gridDimensions.columnCount = _columns.length;
+
+        gridDimensions.columnsCollectionChanged(event);
+        if (dataProvider)
+            gridDimensions.rowCount = dataProvider.length;
         
         if (gridLayout)
             gridLayout.columnsCollectionChanged(event);

                gridSelection.removeAll();
                gridSelection.requireSelection = savedRequireSelection;
            }
            
           clearGridLayoutCache(columnsChanged);            
            
            if (!caretChanged)
                initializeCaretPosition();

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