ExtJs 4: How do I hide/show grid columns on the fly?

前端 未结 4 1128
野的像风
野的像风 2021-01-02 17:46

I need to show/hide columns of a grid on the fly, but it seems that ExtJs 4 has no implemented method for that.

In previous versions I should use columnModel, what d

4条回答
  •  余生分开走
    2021-01-02 18:34

    Ext.getCmp('gridId').columnManager.getColumns()[index].hide();
    Ext.getCmp('gridId').doLayout();
    

    This works for me

提交回复
热议问题