PDA

View Full Version : display rowcount on grid bottom bar



SunWuKung
11 Feb 2010, 1:37 AM
Hi,
I would like to display the totalcount of rows in the bottom bar of a grid - and have that updated on every store reload.
I tried using a paging toolbar - it does what I need, but I don't need the paging part, and don't know how to hide that.

Thanks for the help.
SWK

Eugen_
11 Feb 2010, 2:11 AM
Hello SunWuKung,

see the simple solution without using paging toolbar



/* this to your grid panel */
bbar: [{
xtype: 'tbtext',
text: 'Loading ...'
}]


yourGridPanel.getStore().on('load', function(store, records, options) {
yourGridPanel.getBottomToolbar().get(0).setText('Total count: ' + records.length.toString());
});

SunWuKung
11 Feb 2010, 4:12 AM
Just what I needed.
Thanks a lot.
SWK