     
     /**
      *  @private
-     *  Selected rows.  Vector of rowIndexes that map to the dataProvider items.
-     */    
-    private var grid:Grid;
-
+     *  The owner of the grid.  This class might come into being before
+     *  the grid part is loaded.  This is the connection between this class
+     *  and its grid.
+     */    
+    private var gridOwner:GridContainerBase;
+    
     /**
      *  @private
      *  Vector of rowIndexes that map to the dataProvider items.  If 

import mx.events.CollectionEventKind;
import mx.events.PropertyChangeEvent;

import spark.components.Grid;

use namespace mx_internal;

    
    /**
     *  @private
     *  To connect the selection with its grid.  Can't be in the constructor
     *  since the selectionMode might be set before the grid part is added.
     */
    private function get grid():Grid
    {
        return gridOwner.grid;
    }
    
    /**
     *  @private
     */
    private function isRowSelectionMode():Boolean
    {
