今天在使用extjs 分页查询的遇到了一个小问题,在查询数据时添加了一个加载提示信息,但在点击下一页时,这个加载提示信息没有消失掉,一直在那显示。我就郁闷了。

 

在网上找了好久终于解决了。。。

 

解决办法如下,

 

bbar : new Ext.PagingToolbar( {
    pageSize : 20, // 每页显示多少条数据
    store : qybjcx_store, // 分页控件对应的Store
    displayMsg : '第 {0}到第 {1}条记录,共 {2}条记录',
    prevText : "上一页",
    nextText : "下一页",
    refreshText : "刷新",
    lastText : "最后页",
    firstText : "第一页",
    beforePageText : "当前页",
    afterPageText : "共{0}页",
    displayInfo : true,
   // 非要为true,不然不会显示下面的分页按钮

-----------------------------------------就加了下面的一段代码---------------
   doLoad : function(start){
        record_start = start;
             var o = {}, pn = this.paramNames;
              o[pn.start] = start;
              o[pn.limit] = this.pageSize;
             this.store.reload({
       params :o,
      callback: function (records) {
          if (qybjcx_store.getCount() <= 0) { 
       Ext.Msg.alert("提示", "没有查询到数据!"); 
       } 
          msgTip.hide();
        }
     });
          }
     }),

-------------------------------------------------------------------
   iconCls : 'icon-grid'
  });

 

搞定!