PDA

View Full Version : No Buttons in Ext.PagingToolbar



jvmantovani
5 Jul 2011, 8:36 AM
Hi!
I need to remove all the buttons from PagingToolbars cause im only interested in displayInfo property, wich displays right corner the number of registers..

Im trying this:

grid.on("afterrender", function(component) {
component.getBottomToolbar().refresh.hideParent = true;
component.getBottomToolbar().refresh.hide();
component.getBottomToolbar().next.hideParent = true;
component.getBottomToolbar().next.hide();
component.getBottomToolbar().prev.hideParent = true;
component.getBottomToolbar().prev.hide();
component.getBottomToolbar().first.hideParent = true;
component.getBottomToolbar().first.hide();
component.getBottomToolbar().last.hideParent = true;
component.getBottomToolbar().last.hide();
});It works but leaves three vertical spacing bars besides the 'Page 1 of..' thing...

So guys, how can I remove these remaining items?
Is there a better and smarter way to remove all theses buttons leaving only the displayInfo?

skirtle
5 Jul 2011, 5:34 PM
Isn't that complete overkill? Why not just have a normal toolbar and have a text item that you update on a store's load event?

To answer your question though, I believe you have various options for accessing the separators. You could use the items property, or the get() method, or one of the findBy___() methods.