Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha Premium Member
    Join Date
    Feb 2015
    Vote Rating
    agarapati is on a distinguished road


    Default grid.columns is returning empty array if columns are added to grid using reconfigure




    Ext version tested:
    • Ext 4.2.2 rev 1144
    Browser versions tested against:
    • ____
    • IE11
    • FF39 (firebug 2.0.x installed)
    • Chrome 44
    • Grid columns property is not getting updated if columns are added from controller using reconfigure.
    • As shown in the Fiddle example, our columns will be generated from a ajax call, we are using grid.reconfigure to set store and columns for a grid.
    • We should able to hide/delete the column so we added a delete button in column header.
    • Using handler we tried to get instance of button we tried to use grid.columns[button.colIndex].hide().
    • We observed grid.columns is not getting updated it is giving empty array.
    Steps to reproduce the problem:
    • Open above fiddle url
    • In app/Controlelrs/Grids.js we can see onLaunch method we are defining grid columns and store.
    • We used handler to call hideColumn method in button definition where we tried to use grid.columns
    • Even after grid is reconfigured and columns and data is displayed in browser, grid columns array is not getting updated.
    The result that was expected:
    • grid.columns property should be updated once columns of the grid are added or removed using reconfigure method
    The result that occurs instead:
    • grid.columns property is not getting updated if columns are added to grid from controller using reconfigure

  2. #2
    Sencha - Support Team tristan.lee's Avatar
    Join Date
    Mar 2015
    Vote Rating
    tristan.lee has a spectacular aura about tristan.lee has a spectacular aura about



    columns is a config property that's unrelated to the columns generated when using reconfigure(). In 4, you can make reference to the private class ColumnManager to get the columns:

        hideColumn: function(button, Event) {
            var grid = Ext.getCmp('investmentsGrid'),
                cm = grid.getColumnManager(),
                cols = cm.getColumns();
            if (cols.length > 0) {
    Tristan Lee
    Sencha Inc - Support Engineer

    Having an issue? Help us help you - be detailed; provide some code; demonstrate with a fiddle (

    Embed your fiddle in your post: [­FIDDLE] id [­/FIDDLE]

Similar Threads

  1. Keep certain grid columns after reconfigure
    By Peter Tierney in forum Ext 5: Q&A
    Replies: 2
    Last Post: 13 Jul 2015, 7:33 AM
  2. Replies: 3
    Last Post: 27 Aug 2014, 12:43 AM
  3. Replies: 3
    Last Post: 4 Dec 2013, 12:14 PM
  4. Replies: 5
    Last Post: 24 Sep 2013, 5:55 PM

Thread Participants: 1