paging toolbar events in ExtJS4
We are moving to ExtJS4.But we are facing an issue with paging toolbar events(onClick and onPagingKeyDown).These two are working with ExtJS3.But now these are not working.
ExtJS3 code is:
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 code is:
var grid = Ext.create('Ext.grid.GridPanel',{
store : examplestore,
columns : 开发者_StackOverflow[{
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');
}
})
});
Now we are facing an issue with these onClick and onPagingKeyDown events that are not in ExtJS4.How to achieve these two events?
Help would be appreciated.
onPagingKeyDown
is in ExtJS4. But it is private and it's not recommended to use it. Instead of both onClick
and onPagingKeyDown
you can use beforechange
event.
精彩评论