I want to hide a column in grid panel of ExtJs 5 when store associated with grid panel loads .
Asked
Active
Viewed 812 times
-1
-
But how to get access to a grid panel column and hide it – Anup Gupta Sep 24 '15 at 06:58
-
grid reconfigure. Thats what I would use. have a look at this for example. http://jsfiddle.net/prajavk/t2bvj/ – aMazing Oct 05 '15 at 00:28
4 Answers
0
Depending on how your data store works.... there is onload event. Hide your column on that event.

Chand Priyankara
- 6,739
- 2
- 40
- 63
-
I want to know how we need to code in extjs to access and hide column – Anup Gupta Sep 24 '15 at 06:59
0
Using the following syntax you can achieve it:
<yourGrid>.down('headercontainer').getGridColumns()[<columnIndex>].hidden = true;

Ankit Chaudhary
- 4,059
- 1
- 11
- 23
0
If you know the index of the column to hide you can use this code after store load event fired
grid.getColumnManager().getHeaderAtIndex(indexOfColumn).hide()

Ruben Vardanyan
- 1,298
- 9
- 19
-1
You can find the api from manual [Ext.grid.column.Column-method-hide]: http://docs.sencha.com/extjs/5.0/5.0.1-apidocs/#!/api/Ext.grid.column.Column-method-hide
There is a fiddle for you: http://runjs.cn/code/qusp7pql

Aladin Lee
- 51
- 1
- 7