             return false;
         
         if (getGridDataProviderLength() == 0 || getGridColumnsLength() == 0)
+        {
+            grid.caretRowIndex = grid.caretColumnIndex = -1;
             return false;
+        }
         
         // If there isn't a selection, set one, using the grid method rather
         // than the internal one, so that the caretPosition will be updated too.

     *
     *  @default GridSelectionMode.SINGLE_ROW
     * 
     *  @see spark.components.supportClasses.SelectionMode
     * 
     *  @langversion 3.0
     *  @playerversion Flash 10

                const rowIndex:int = firstRemoveIndex <= dataProviderLength - 1 ? 
                                     firstRemoveIndex : dataProviderLength - 1;
                if (isRowSelectionMode() && !hasRowSelection())
                        setRow(rowIndex);
                else if (isCellSelectionMode() && !hasCellSelection())
                        setCell(rowIndex, 0);
                }
            }

        return elementChanged;
    }
