allow string based values for comboboxarray
[roojs1] / Roo / grid / CellSelectionModel.js
index 2123eea..95364f8 100644 (file)
@@ -59,8 +59,9 @@ Roo.grid.CellSelectionModel = function(config){
          /**
             * @event beforeeditnext
             * Fires before the next editable sell is made active
-            * You can use this to skip to another cell
-            * @param {Array} newCell the new [ row, col ] to be selected
+            * You can use this to skip to another cell or fire the tabend
+            *    if you set cell to false
+            * @param {Object} eventdata object : { cell : [ row, col ] } 
             */
            "beforeeditnext" : true
     });
@@ -284,19 +285,23 @@ Roo.extend(Roo.grid.CellSelectionModel, Roo.grid.AbstractSelectionModel,  {
             
             e.stopEvent();
             
-        }else if(k == e.ENTER &&  !e.ctrlKey){
+        } else if(k == e.ENTER &&  !e.ctrlKey){
             ed.completeEdit();
             e.stopEvent();
             newCell = g.walkCells(ed.row, ed.col+1, 1, this.acceptsNav, this);
-        }else if(k == e.ESC){
+        
+               } else if(k == e.ESC){
             ed.cancelEdit();
         }
-        
-        
+               
+        if (newCell) {
+            var ecall = { cell : newCell, forward : forward };
+            this.fireEvent('beforeeditnext', ecall );
+            newCell = ecall.cell;
+                       forward = ecall.forward;
+        }
+               
         if(newCell){
-            
-            this.fireEvent('beforeeditnext',newCell);
-            
             //Roo.log('next cell after edit');
             g.startEditing.defer(100, g, [newCell[0], newCell[1]]);
         } else if (forward) {