var tbar2 = new Ext.Toolbar({
// renderTo : grid4.tbar,
items : [{
text : 'text1',
tooltip : 'information1',
iconCls : 'option',
handler : query
}, '-', {
text : 'text1',
tooltip : 'information1',
iconCls : 'save',
handler : show
}]
});
var grid4 = new Ext.grid.GridPanel({
id : 'button-grid',
region : 'center',
title : '',
iconCls : 'icon-grid',
store : estore,
autoScroll : true,
cm : cm,
tbar : new Ext.Toolbar({
autoWidth : true,
autoShow : true,
items : [{
text : 't1',
tooltip : 'tip1',
iconCls : 'option',
handler : reloadstore
}, '-', {
text : 't2',
tooltip : 'tip2',
iconCls : 'option',
handler : closetime
}]
}),
listeners : {
'render' : function() {
tbar2.render(this.tbar); // add tbar
}
},
viewConfig : {
forceFit : true
},
bbar : new Ext.PagingToolbar({
displayInfo : true,
beforePageText : '页 ',
afterPageText : ' 共 {0} 页',
firstText : '第一页 ',
prevText : '前一页',
nextText : '下一页',
lastText : '最后一页',
refreshText : '刷新',
pageSize : 18,
store : etstore,
displayMsg : '显示第 {0} 到 {1} 条 , 共 {2} 条记录',
emptyMsg : "没有记录"
})
});
需要注意:
listeners : {
'render' : function() {
tbar2.render(this.tbar); // add tbar
}
},