首页 > Web开发 > 详细

Extjs隐藏某列

时间:2014-07-24 17:27:41      阅读:503      评论:0      收藏:0      [点我收藏+]
如何在动态的修改列的显示和隐藏:
下面为示例代码:
if(matchStatus.getValue()=="weipp"){

colMode=this.getColumnModel();

var handColIndx=colMode.findColumnIndex("match");

colMode.setHidden(handColIndx,false);

}else{

var colMode=this.getColumnModel();

var handColIndx=colMode.findColumnIndex("match");

colMode.setHidden(handColIndx,true);

}

 

 

注意的是:当列当中配置了gridShow : false,的时候,就无法找到列对象了
 可以写在refresh中
调用:
  1. listeners :{
  2. afterrender :function(){
  3. var thisGrid =this;
  4. var colMode = thisGrid.getColumnModel();
  5. var handColIndex = colMode.findColumnIndex(‘satisfactionName‘);
  6. if(thisGrid.petitionTypeCode==3){
  7. colMode.setHidden(handColIndex,false);
  8. }else{
  9. colMode.setHidden(handColIndex,true);
  10. }
  11. }
  12. },
 
               
 
 

 





Extjs隐藏某列,布布扣,bubuko.com

Extjs隐藏某列

原文:http://www.cnblogs.com/babyhhcsy/p/3865655.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!