我们正在转向 ExtJS4。但我们面临分页工具栏事件(onClick 和 onPagingKeyDown)的问题。这两个正在与 ExtJS3 一起使用。但现在这些都不起作用。
ExtJS3 代码为:
var grid = new Ext.grid.GridPanel({
store : examplestore,
columns : [{
header : s.no,
width : 40
},{
header : company name,
width : 100
},{
header : address,
width : 150
}],
bbar: new Ext.PagingToolbar({
pageSize : 10,
store : examplestore,
width : 350,
onClick : function(){
alert('you have clicked');
},
onPagingKeyDown : function(){
alert('hello');
}
})
});
ExtJS4 代码为:
var grid = Ext.create('Ext.grid.GridPanel',{
store : examplestore,
columns : [{
header : s.no,
width : 40
},{
header : company name,
width : 100
},{
header : address,
width : 150
}],
bbar: Ext.create('Ext.toolbar.Paging',{
pageSize : 10,
store : examplestore,
width : 350,
onClick : function(){
alert('you have clicked');
},
onPagingKeyDown : function(){
alert('hello');
}
})
});
现在我们面临一个问题,这些 onClick 和 onPagingKeyDown 事件不在 ExtJS4 中。如何实现这两个事件?
帮助将不胜感激。