Results 1 to 9 of 9

Thread: [4.0.2a] Ext.grid.Panel. reconfigure() Causing Column Headers to Disappear

    Looks like we can't reproduce the issue or there's a problem in the test case provided.
  1. #1

    Default [4.0.2a] Ext.grid.Panel. reconfigure() Causing Column Headers to Disappear

    There's an issue when firing the grid.Panel.reconfigure() method. After rearranging columns and firing reconfigure(null, newCols) all column headers disappear!

    I'm running a simple test. I took one of the grids in examples, added a button that rearranges the grid.columns[] and fires the rearrange method. The first time the function is called, there is an exception:

    (uncaught exception: [Exception... "Component returned failure code: 0x80004003 (NS_ERROR_INVALID_POINTER) [nsIDOMHTMLDivElement.insertBefore]" nsresult: "0x80004003 (NS_ERROR_INVALID_POINTER)" location: "JS frame :: file:///C:/Documents%20and%20Settings/tabacd/Desktop/Extjs4.0.2a/ext-4.0.2a/ext-all-debug.js :: anonymous :: line 15686" data: no]),

    All column headers disappear, but columns are not rearranged. All subsequent calls result in proper column reordering, no exceptions but the column headers never reappear.

    Screenshot:
    senchaReconfigureBUG.jpg

    I believe this thread is reporting a similar issue - http://www.sencha.com/forum/showthre...ht=reconfigure

    Also, if calling reconfigure with unchanged column order, the whole grid disappears (col headers and data).

    Thanks in advance.












    REQUIRED INFORMATION


    Ext version tested:

    • Ext 4.0.2a



    Browser versions tested against:

    • ____
    • FF3 (firebug 1.3.0.10 installed)



    Description:

    • Script is attempting to reorder columns programmatically. Once the new column order is in place, Panel.reconfigure(null, columns) is being called. The first call to this method causes an exception (uncaught exception: [Exception... "Component returned failure code: 0x80004003 (NS_ERROR_INVALID_POINTER) [nsIDOMHTMLDivElement.insertBefore]" nsresult: "0x80004003 (NS_ERROR_INVALID_POINTER)" location: "JS frame :: file:///C:/Documents%20and%20Settings/tabacd/Desktop/Extjs4.0.2a/ext-4.0.2a/ext-all-debug.js :: anonymous :: line 15686" data: no]) and all column headers disappear (columns are not reordered). All subsequent calls do re-arrange the columns, but the column headers never reappear.



    Steps to reproduce the problem:

    • Get a handle of Ext.grid.Panel.columns
    • Change order of 2 or more columns, (ie. columns[0] swaps with columns[3])
    • Call Panel.reconfigure(null, columns)



    The result that was expected:

    [LIST][*] Columns to be in correct order & column headers to be in place

    [LIST]

    The result that occurs instead:

    • First time calling, nothing happens to column order and all column headers disappear.
    • All subsequent calls successfully reorder columns but headers are forever missing.



    Test Case:

    Code:
    //I'm testing this via button click.
    
                handler: function() {
                console.log('testing reconfigure function call');
                var cols = grid4.columns;
                var newCols = [];
                newCols.push(cols[5]);
                newCols.push(cols[4]);
                newCols.push(cols[3]);
                newCols.push(cols[2]);
                newCols.push(cols[1]);
                newCols.push(cols[0]);
                //grid4.columns = newCols;
                //grid4.view.bindStore(null);
                grid4.reconfigure(null, newCols);
    HELPFUL INFORMATION


    Screenshot or Video:


    See this URL for live test case: http://


    Debugging already done:

    • none



    Possible fix:

    • not provided



    Additional CSS used:

    • only default ext-all.css
    • custom css (include details)



    Operating System:

    • ________
    • WinXP Pro

  2. #2

    Default

    Just wondering whether there is any update for this? We experienced similar issue here. Thank you in advance.
    Use FF5 with firebug installed

  3. #3

    Default

    I have the same problem.
    It need to move all column config to another array and call reconfigure to make it work.
    Waiting for the fix.
    Sorry for my bad English.

  4. #4

    Default

    Reconfigure() also doesn't work with 'checkbox' selection model. Checkboxes are lost after the call. Hopefully this will be addressed as well.

  5. #5
    Sencha User
    Join Date
    Aug 2011
    Posts
    5

    Default

    Quote Originally Posted by anonymoose View Post
    Reconfigure() also doesn't work with 'checkbox' selection model. Checkboxes are lost after the call. Hopefully this will be addressed as well.
    Exact same issue here. Please address this soon Sencha...

  6. #6
    Sencha User
    Join Date
    Feb 2008
    Posts
    20

    Default +1 for this

    Also an issue for me - would love to see a solution or work-around.

  7. #7
    Ext JS Premium Member
    Join Date
    Aug 2011
    Posts
    1

    Default This seems to work ...

    I have no idea why but ...

    ...
    ...
    someHandler: function (context, rowIndex, colIndex) {
    this.reconfigureGrid(this.store, [
    { header: '' },
    { header: 'xName', dataIndex: 'Name' },
    { header: 'xDescr', dataIndex: 'Descr', flex: 1 }
    ]);
    },
    reconfigureGrid: function (store, columns) {
    this.reconfigure(store, columns);
    },
    ...
    ...

  8. #8
    Sencha Premium User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,250

    Default

    Both of the issues you've mentioned have been resolved in source control, they will be part of the next release.
    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.

  9. #9
    Sencha User
    Join Date
    Jun 2016
    Posts
    1

    Default still facing reconfigure issue on our SELMODEL in the grid panel

    Quote Originally Posted by evant View Post
    Both of the issues you've mentioned have been resolved in source control, they will be part of the next release.

    We are using Ext 6.0.2 Classic, where we are not able to restore back the SelModel into the grid.
    the checkbox in the header column disappears upon calling grid.reconfigure(store, cols);

    tried grid.getView().refresh() over reconfigure. but nothing helped.

    Do we have any solution for the this?

Posting Permissions

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