extjs点击搜索按钮后显示的当前页不是第一页的解决方案

来源:岁月联盟 编辑:exp 时间:2012-07-12

{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);    //加载后显示第一页
               }
     


       }


作者:woshiyjk