         public function get selectedIndex():int
         {
             var selectedRows:Vector.<int> = gridSelection.allRows();
-            return selectedRows.length ? selectedRows[0] : -1;
+            return (selectedRows.length > 0) ? selectedRows[0] : -1;
+        }
+        
+        /**
+         *  @private
+         */
+        public function set selectedIndex(value:int):void
+        {
+            var f:Function = function():void
+            {
+                if (value != -1)
+                    setSelectedIndex(value);
+                else
+                    clearSelection();
+            }
+            deferredOperations.push(f);  // function f() to be called by commitProperties()
+            invalidateProperties();
         }
         
         //----------------------------------

         *  control, the control dispatches the <code>selectionChange</code> 
         *  event. When the user changes the selection programmatically, the 
         *  control dispatches the <code>valueCommit</code> event.</p>
         *  @default []
         * 
         *  @return Vector of <code>dataProvider</code> items.

    {
        include "../core/Version.as";
        
        /**
         *  @private
         *  A list of functions to be called at commitProperties() time, after the dataProvider
         *  has been set.  This list is used to defer making grid selection updates per the 
         *  set methods for the selectedIndex, selectedIndices, selectedItem, selectedItems, 
         *  selectedCell and selectedCells properties.
         */
        private const deferredOperations:Vector.<Function> = new Vector.<Function>();
        
        /**
         *  @private
         *  True while updateDisplayList is running.
         */
        private var inUpdateDisplayList:Boolean = false;
        
        
        // TODO(hmuller): the following public variables are temporary 
        
        public var backgroundGroup:Group;
        public var selectionGroup:Group;    
        public var itemRendererGroup:Group;
        public var overlayGroup:Group;
        
        
        public function Grid()
        {
