-1

I want to hide a column in grid panel of ExtJs 5 when store associated with grid panel loads .

Tarabass
  • 3,132
  • 2
  • 17
  • 35

4 Answers4

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
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