View Full Version : Initializing Paging Toolbar when clearing data store question

31 Jan 2013, 9:59 AM

I have a window with a grid using pagination bar. I have a clear button which executes the removeAll() method on the store to clear the data.

Problem is the pagination toolbar still retains the values such as Page 2 of 3, etc.

I've looked & have tried some of the methods within the toolbar to clear this info but haven't come up with a solution. I tried setting the displayInfo property to false but that seems to hide the toolbar completely.

Any suggestions?

4 Feb 2013, 12:30 PM
By default, the paging toolbar only listens to the beforeload, load and exception events on the store so if you are just removing all the items, there isn't going to be an event the paging toolbar is listening to. You can execute the updateInfo method on the toolbar

5 Feb 2013, 5:01 AM
Hi Mitchell,

That solved the message part of the toolbar. Is there a way to also clear the page information also.

Example : Page 1 of 3 still appears after the updateInfo method.

I've thought about firing off another load event with criteria that wouldn't return any rows but was hoping there might be a better way.