2016-08-29 4 views

답변

2

이 질문은 Filter Header Update 와 약간 비슷합니다. 내 접근 방식이 무엇인지 깨닫는 방법. 정확히 원하는 이미지를 가진 하나의 CSS를 준비해야합니다. 당신의 필요에 따라 CSS를 같이 또는 변경에 대한 귀하의 코드 :

.filtered-column {  
background:url(http://dev.toadformysql.com/webhelp/...fiedFilter.png) no-repeat !important; 
background-position: calc(100% - 5px) 3px !important; 
} 

필터 클래스에서 자신의 updateColumnHeadings 방법에서 그런 다음 CSS를

newCls : 'filtered-column', 

를 호출하고 아래 코드를 사용합니다.

updateColumnHeadings : function() { 
    var view = this.grid.getView(), 
     i, len, filter; 
    if (view.mainHd) { 
     for (i = 0, len = view.cm.config.length; i < len; i++) { 
      filter = this.getFilter(view.cm.config[i].dataIndex); 
      Ext.fly(view.getHeaderCell(i))[filter && filter.active ? 'addClass' : 'removeClass'](this.newCls); // In this line we are adding the newCls which will aply for filter. 
     } 
    } 
}, 

참고 : 나는 내 필터에 확인하고 그것을 작동합니다. 요구 사항에서 필터가 맞춤 설정되면 작동하지 않을 수 있지만 이상적으로 적용된 필터 헤더를 업데이트하는 방법입니다.