0

In extjs I have a GridPanel.

I want to hide some of the columns of this gridpanel, I am using Hidden="true" for this and it is working fine.

The problem is, when I click on the Grid menu, there is an option called 'Columns'. When you mouseover 'Columns' you can check/uncheck the columns you want to show/hide.

I want to display the hidden columns in this list(unchecked) so that user can check them and manually display it on the grid.

I tried setting Hideable="true" but still these columns are not displying in the 'Columns' list.

Please suggest a solution

Microsoft DN
  • 9,706
  • 10
  • 51
  • 71
  • Hidden columns should be displayed in the list. May be the issue with ExtJs version. You can try newer versions. Check out the example. http://try.sencha.com/extjs/4.0.7/examples/grid/cell-editing/viewer.html Use the config,`hidden:true,` and then you can see, the hidden column appears – Vivek Vardhan Jun 27 '14 at 08:19

1 Answers1

0

The configuration option is hidden:true (lowercase), for example:

            ,columns:[{
                 text:'Company'
                ,dataIndex:'company'
                ,flex:10
            },{
                 text:'Price'
                ,xtype:'numbercolumn'
                ,dataIndex:'price'
                ,align:'right'
                ,width:80
            },{
                 text:'Last Updated'
                ,xtype:'datecolumn'
                ,dataIndex:'lastChange'
                ,align:'right'
                ,width:135
                ,hidden:true
            },{
                 text:'Industry'
                ,dataIndex:'industry'
                ,flex:4
            }] // eo columns

In this case, column Last Updated is initially hidden, but still appears in the column menu. If you still have troubles, make a showcase at https://fiddle.sencha.com

Saki
  • 5,827
  • 2
  • 15
  • 15