Extjs:添加查看全部按钮
var grid =new Ext.grid.GridPanel({ renderTo:'tsllb', title:'产品成本列表', selModel:csm, height:350, columns:[ csm, {header: "编码", dataIndex: "bm", sortable: true,hidden:true}, {header: "产品", dataIndex: "cp", sortable: true}, {header: "成本", dataIndex: "cb", sortable: true,align:'left'} ], store:store, tbar:new Ext.PagingToolbar({ id:'bbar', emptyMsg:"没有数据", displayInfo:true, displayMsg:"显示从{0}条数据到{1}条数据,共{2}条数据", store:store, pageSize:50 }), bbar:[{ pressed: true, enableToggle:true, text: '查看全部', toggleHandler: function(btn, pressed){ search(10000); } }] });
var search = function(pageSize){ store.load({ params:{start:0,limit:pageSize,param:param}}); Ext.getCmp("bbar").pageSize=pageSize; }