how to show/ hide column in a extjs 3 grid panel

前端 未结 6 1154
温柔的废话
温柔的废话 2020-12-10 04:26

I have a grid panel i need to show / hide columns in a grid panel depending on the value of a checkbox. If the checkbox is checked i need to display column in the grid and i

6条回答
  •  粉色の甜心
    2020-12-10 05:20

    In Ext JS 4.1, to hide a column, you use:

    grid.columns[0].setVisible(false);
    

    Looks like getColumnModel() with its setHidden() method is no longer part of the grid: http://docs.sencha.com/ext-js/4-1/#!/api/Ext.grid.Panel

提交回复
热议问题