View Full Version : Grid without Pagin toolbar's next previous buttons

7 Dec 2011, 2:17 AM
Hi there,
I have a Grid with Paging toolbar working very fine. Now my requirement is

I want to show Gird with display msg. but not with Paging tool bar. I mean if you consider the paging toolbar I don't want following things
1] Next button29845
2] Previous button
3] Refresh button
4] Last button
5] First Button

I want to display only the msg that no record found etc.

For this I have created new tool bar. but not sure how to display "No data to display" msg on it.

Please guide me. Also suggest if there is any config available to disabled the button's from paging toolbar.

7 Dec 2011, 2:46 AM
its all here:

you could just extend the class and remove the insertion inside of the initComponent:

initComponent : function(){
var me = this,
pagingItems = me.getPagingItems(),
userItems = me.items || me.buttons || [];

if (me.prependButtons) {
me.items = userItems.concat(pagingItems);
} else {
me.items = pagingItems.concat(userItems);
me.items = userItems;
delete me.buttons;

if (me.displayInfo) {
me.items.push({xtype: 'tbtext', itemId: 'displayItem'});


7 Dec 2011, 3:19 AM
Thanks for the Reply, I will implement it this logic.

Just for curiosity Can you please suggest if this is correct way or not? and how to get store items count?
Here is my code

dockedItems: [{
xtype: 'toolbar',
items :[
xtype: 'tbtext',
text : 'No Records to Display',
scope : this,
afterrender: function()
//var count = grid2.getStore().getCount();
var text = ""
dock: 'bottom'


Please tell me how will I get the Grid;s store object inside this dockedItems, So that If the count is greater than 0 [Zero] will display empty msg.

Once again thanks for the reply