日期:2014-05-16  浏览次数:20409 次

extjs点击搜索按钮后显示的当前页不是第一页的解决方案
{xtype: 'textfield',
       name: 'ruleCode',
       id:'ruleCode_'+brUnitRuleGrid.moduleId,
       fieldLabel: '规则编号',
       labelWidth:60,
       width:120
       },
       {
        xtype:'button',
        text:'搜索',
        iconCls:'find',
        id:'brUnitRuleSearchButton-'+brUnitRuleGrid.moduleId,
        handler:function () {
                var code = Ext.getCmp('ruleCode_'+brUnitRuleGrid.moduleId).getValue(); //获取文本框值
              brUnitRuleGrid.store.pageNum = 1;         //向后台传的页面

                brUnitRuleGrid.store.condition = code;   //给Store中的条件赋值,

                  brUnitRuleGridStore.loadPage(1);    //加载后显示第一页
               }
      


       }