ExtJs获取grid表头的checkBox

    initComponent: function () {

   this.callParent(arguments);

     this.on('specialkey', function (f, e) {
      if (e.getKey() == e.ENTER) {
      this.onTrigger2Click();
      }
   }, this);
   this.headerCt.on("headerclick", function (ct, column, e, t, opts) {
      var checkHead = ct.gridDataColumns[1];
      if (checkHead.hasCls('x-grid-hd-checker-on')) {
        alert('全选');
      }
      else {
        alert('取消全选');
      }
   });

 }

posted @ 2012-09-26 09:59  Servant  阅读(321)  评论(0编辑  收藏  举报