Tuesday, 28 October 2008

[ExtJs] dynamically Add button PagingToolBar

==== create PagingToolbar ====
var toolBar = new Ext.PagingToolbar({
pageSize:10,
store:store,
displayInfo:true,
displayMsg: 'total{2} {0} - {1}',
emptyMsg:'no data'
})

======== create Toolbar Button =======
var sbun = new Ext.Toolbar.Button({
pressed: true,
enableToggle: false,
text: 'Create',
id: 'createId',
cls: ''
})


======= create Grid with PagingToolbar =======
var grid = new Ext.grid.GridPanel({
el:'Firmware-grid',
store:store,
cm:cm,
//sm: new Ext.grid.RowSelectionModel({selectRow:Ext.emptyFn}),
viewConfig:{
forceFit:true
},
title:' grid title',
width:500,
height:500,
loadMask:true,
frame:false,
bbar:toolBar
});

====== Add Toolbar Button ====
grid.render();
grid.getBottomToolbar().add('-',sbun);

4 comments:

Anonymous said...

Worked a treat. Saved me loads of time, thanks.
Sven

marker said...

thanks

Anonymous said...

[url=http://www.23planet.com]Online casinos[/url], also known as settled casinos or Internet casinos, are online versions of circadian ("slab and mortar") casinos. Online casinos make up individually gamblers to special up and wager on casino games being the Internet.
Online casinos typically forth odds and payback percentages that are comparable to land-based casinos. Some online casinos contend higher payback percentages as a countermeasure as regards duty automobile games, and some crowd clear payout off audits on their websites. Assuming that the online casino is using an aptly programmed indefinitely hundred generator, catalogue games like blackjack preoccupy an established race edge. The payout mend search of these games are established during the rules of the game.
Numerous online casinos sublease pass‚ or tumble to their software from companies like Microgaming, Realtime Gaming, Playtech, Supranational Ploy Technology and CryptoLogic Inc.

Anonymous said...

top [url=http://www.xgambling.org/]casino games[/url] check the latest [url=http://www.realcazinoz.com/]casino games[/url] autonomous no consign hand-out at the foremost [url=http://www.baywatchcasino.com/]casino games
[/url].