Results 1 to 6 of 6

Thread: BUG: Dynamic cell editig

    Wait! Looks like we don't have enough information to add this to bug database. Please follow this template bug format.
  1. #1
    Ext JS Premium Member dtex-lab's Avatar
    Join Date
    Sep 2009
    Location
    Italy
    Posts
    399
    Vote Rating
    7
      2  

    Default BUG: Dynamic cell editig

    Here a simple fiddle which using 6.2.1 works and using 6.5 not

    The code simply changes the editor in the beforeedit method

    https://fiddle.sencha.com/#view/editor&fiddle/1vsn

    If you click in different cells you will have an error in the browser console using 6.5
    Using 6.2.1 all works fine

    Please, help me to understand is there is a workaround, I had search for it a lot without luck.

    Thanks in advance
    we make IT work for you

  2. #2
    Ext JS Premium Member dtex-lab's Avatar
    Join Date
    Sep 2009
    Location
    Italy
    Posts
    399
    Vote Rating
    7
      0  

    Default

    Hi, please could someone help me in this task?
    Really it looks like a bug introduced in 6.5
    we make IT work for you

  3. #3
    Sencha Premium Member richardvd's Avatar
    Join Date
    Jun 2011
    Location
    NL
    Posts
    255
    Vote Rating
    71
      0  

    Default

    I can't tell if you are doing it right, but here is an alternative approach using getEditor:


  4. #4
    Sencha Premium User
    Join Date
    Dec 2013
    Location
    Italy
    Posts
    82
    Vote Rating
    21
      1  

    Default

    Hi,
    the problem is caused by editor component caching, it doesn't support to change the editor without refreshing cache map.

    The workaround is to clear cache every time you set an editor dinamically:
    Code:
        plugins: [{
            ptype: 'cellediting',
            clicksToEdit: 1,
            listeners: {
                beforeedit: function (aEditor, aContext, aOpts) {
                    aEditor.editors.clear();
                    aContext.column.setEditor('textfield');
                    return true;
                }
            }
        }],
    Here is the working fiddle: https://fiddle.sencha.com/#view/editor&fiddle/20f2

  5. #5
    Sencha Premium User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,144
    Vote Rating
    985
      0  

    Default

    I can reproduce this with the 6.5.0 release, but not with a recent nightly.

    Can you confirm?
    Twitter - @evantrimboli
    Former Sencha framework engineer, available for consulting.
    As of 2017-09-22 I am not employed by Sencha, all subsequent posts are my own and do not represent Sencha in any way.

  6. #6
    Sencha Premium Member milestonebass's Avatar
    Join Date
    Dec 2009
    Location
    Melbourne, Australia
    Posts
    27
    Vote Rating
    1
      0  

    Default

    Hello Evan,

    I have recently upgraded to 6.5.2 in hopes of this being resolved, but I am still seeing the issue for a column's getEditor. See fiddle here:
    https://fiddle.sencha.com/#view/editor&fiddle/2ait

    The getEditor in the example will select one of two different editors depending on a record's value - but it appears that the first selection defines the editor and then it is cached from then on. Source code seems to indicate this behavior also - caching takes precedence over the column defined getEditor. Can a config possibly be added to tell the editor to evaluate and not take the cached editor for this column's itemId?

Similar Threads

  1. Dynamic table or cell arrangment
    By mc_user in forum Sencha GXT Q&A
    Replies: 1
    Last Post: 26 May 2014, 10:13 PM
  2. Grid Add/Remove dynamic cell?
    By Stan92 in forum Ext: Discussion
    Replies: 0
    Last Post: 29 Apr 2011, 12:55 AM
  3. Dynamic Cell Editor
    By thomson in forum Ext 2.x: Help & Discussion
    Replies: 3
    Last Post: 30 Jul 2008, 1:52 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
  •