문제

in my GridPanel I have different Columns. Now I want dynamically set a few of them to hidden:true. I gave the columns ID's but I have no success on it. For example

Ext.getCmp("mainfield").setHidden(true);

Doesn't work. Any ides or help? THANK YOU!!!

도움이 되었습니까?

해결책

Try this:

grid.columns[columnIndex].hide();

or

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

To find column by id use down:

grid.down('gridcolumn#mainfield').hide();

다른 팁

The method you're looking for is hide:

Ext.getCmp("mainfield").hide();
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top