【发布时间】:2011-07-25 03:39:58
【问题描述】:
我们正在迁移到 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');
}
})
});
现在我们面临一个ExtJS4中没有的onClick和onPagingKeyDown事件的问题。如何实现这两个事件?
我们将不胜感激。
【问题讨论】: