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

前端 未结 6 1179
温柔的废话
温柔的废话 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:23

    setVisibleColumn       : function(name, flag) {
        name = Ext.Array.from(name);
        var column;
    
        for (var i = 0; i < name.length; i++) {
            column = this.getColumn(name[i]);
            if (column) {
                flag ? column.show() : column.hide();
            }
        }
    
    }
    

提交回复
热议问题