Results 1 to 2 of 2

Thread: [DUP][2.2.1] Grid editing - clicking on another cell

  1. #1
    Ext JS Premium Member
    Join Date
    Sep 2007
    Posts
    17

    Default [DUP][2.2.1] Grid editing - clicking on another cell

    Following on from this thread: http://extjs.com/forum/showthread.ph...complete+click

    If you change a value in an editable grid and click on another cell, the grid doesn't go into edit mode for that cell. There was a partial fix in the thread above which basically deferred the setting of the value for 200ms after the edit is complete.
    From what I could gather the problem seems to be that the record.set would occur and trigger a store update which causes a row update and redraws the row. This would cause the click event to be thrown away.
    I tried to get around this because it causes the stopEditing to not work properly as the value wouldn't be set until 200ms after the call. I've got the following which is placed before the r.set in the onEditComplete, where the general idea is that if the rowupdated event fires on the view (i.e. the value has changed) and we are not editing and there is a selected cell and no editor selected then we start editing the cell that is selected. This works for clicks but not for tabbing. I have modified the code slightly for my own code base to allow tabbing to work (basically setting a flag when tab is pressed and checking that in the code below). I wonder if there is anything better you guys have come up with.

    Code:
    this.view.on('rowupdated', function(){
    	if (this.editing !== true && this.selModel.selection && !this.activeEditor) {
    		this.startEditing(this.selModel.selection.cell[0], this.selModel.selection.cell[1]);
    	}
    	this.startingEdit = false;
    }
    , this, {
    	scope: this,
    	single: true
    });

  2. #2
    Sencha User Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246

    Default

    Duplicate of this bug (different workaround provided).

    It's all caused by the current refreshRow implementation (see here).

Posting Permissions

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