Results 1 to 2 of 2

Thread: EditorGrid Single Selection Model bug?

  1. #1
    Ext User coltsfan2k's Avatar
    Join Date
    Mar 2007
    Posts
    3
    Vote Rating
    0
      0  

    Default EditorGrid Single Selection Model bug?

    I'm working with version 1.0 alpha2 using an EditorGrid with a RowSelectionModel set to singleSelect as such
    Code:
    var selModel = new Ext.grid.RowSelectionModel({singleSelect:true});
    Each row in the grid represents an entity even though you can only edit one cell at a time, so it is desirable to have the entire row selected. When I'm editing a cell and hit enter the next cell below becomes editable. This works great, however the previous row remains selected. Is this a bug or do I need to manage the selection of the row below?

    The function below is defined in RowSelectionModel
    Code:
        onEditorKey : function(field, e){
            var k = e.getKey(), newCell, g = this.grid, ed = g.activeEditor;
            if(k == e.TAB){
                if(e.shiftKey){
                    newCell = g.walkCells(ed.row, ed.col-1, -1, this.acceptsNav, this);
                }else{
                    newCell = g.walkCells(ed.row, ed.col+1, 1, this.acceptsNav, this);
                }
                e.stopEvent();
            }else if(k == e.ENTER && !e.ctrlKey){
                if(e.shiftKey){
                    newCell = g.walkCells(ed.row-1, ed.col, -1, this.acceptsNav, this);
                }else{
    debugger;
                    newCell = g.walkCells(ed.row+1, ed.col, 1, this.acceptsNav, this);
                }
                e.stopEvent();
            }else if(k == e.ESC){
                ed.cancelEdit();
            }
            if(newCell){
                g.startEditing(newCell[0], newCell[1]);
            }
        }
    Right after my debugger statement newCell is assigned with what appear to be the appropriate values, so all seems to be ok.

    Any thoughts?

    Thanks in advance.
    Coltsfan2k

  2. #2
    Sencha User JeffHowden's Avatar
    Join Date
    Mar 2007
    Location
    Forest Grove, OR
    Posts
    1,038
    Vote Rating
    1
      0  

    Default

    The current release is alpha 3, rev 4. Start by updating to that and see if the problem persists.
    Jeff Howden
    Ext JS - Support Team Volunteer
    jeff@extjs.com

Similar Threads

  1. Grid Single Selection only?
    By steven in forum Ext 2.x: Help & Discussion
    Replies: 5
    Last Post: 14 Apr 2011, 5:40 AM
  2. [A3R4] Single Event Bug
    By JeffHowden in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 13 Mar 2007, 8:23 PM
  3. TreeView and Node Single Click.
    By jon.whitcraft in forum Ext 1.x: Help & Discussion
    Replies: 2
    Last Post: 24 Jan 2007, 8:56 AM
  4. Single or multiple page layout?
    By seldon in forum Ext 1.x: Help & Discussion
    Replies: 0
    Last Post: 23 Dec 2006, 3:22 AM
  5. Grid Editor and Selection Model
    By jack.slocum in forum Community Discussion
    Replies: 0
    Last Post: 10 Nov 2006, 3:49 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •