码迷,mamicode.com
首页 > 其他好文 > 详细

Ext分页条扩展选择显示数量

时间:2015-05-14 16:08:18      阅读:155      评论:0      收藏:0      [点我收藏+]

标签:

bbar: {

                      xtype: ‘pagingtoolbar‘,

                      pageSize: 20,

                      store: "activity.ActivityPurchaseStore",

                      displayInfo: true,

                      plugins: new Ext.ux.ProgressBarPager(),

                 items:[{

                   xtype:‘displayfield‘,

                   value:‘每页‘

                   },{

                      xtype: ‘combo‘,

                      width:70,

                      align:‘center‘,

                      store: Ext.create(‘Ext.data.Store‘, {

                          fields: [‘value‘, ‘key‘],

                          data : [

                              {"value":5, "key":5},{"value":10, "key":10},

                              {"value":15, "key":15},{"value":20, "key":20},

                              {"value":25, "key":25},{"value":30, "key":30},

                              {"value":35, "key":35},{"value":40, "key":40},

                              {"value":45, "key":45},{"value":50, "key":50},

                              {"value":100, "key":100},{"value":200, "key":200},

{"value":500, "key":500},{"value":1000, "key":1000}

                          ]

                      }),

                      value:20,

                      queryMode: ‘local‘,

                      displayField: ‘key‘,

                      valueField: ‘value‘,

                      listeners:{

                      select:function(combo, record, index){

                          var me=this;

                          var limit=me.getValue();

                          var store=me.up(‘grid‘).getStore();

                             store.pageSize=limit;

                             store.loadPage(1,{

                                     params: {

                                         start: 0,

                                         limit:limit

                                     }

                                 });

                      }

                      }

                  },{

                   xtype:‘displayfield‘,

                   value:‘条‘

                   }]

                  }

Ext分页条扩展选择显示数量

标签:

原文地址:http://www.cnblogs.com/a-long/p/4503261.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!