当前位置:编程学习 > JS >>

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


       }


作者:woshiyjk
补充:web前端 , JavaScript ,
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,