PDA

View Full Version : How to reset paging toolbar on click of reset button.



varmaj80
4 Aug 2014, 2:12 PM
Hi,

I am using extjs 4.2.3. I need to reset the result grid and the paging toolbar on click of a reset button. I am able to clear the grid with the following code. The grid becomed empty but the pagination with the page numbers and the page count is not resetting.

if(this.searchResultsGrid.getStore()) {
this.searchResultsGrid.getStore().removeAll();
this.searchResultsGrid.getView().refresh();
}
This is clearing the search results part but the pagination buttons at the bottom are not resetting and still show the page numbers and the number of records. How should I reset that information as well?.

Thanks,

mitchellsimoens
6 Aug 2014, 5:19 AM
The paging toolbar only listens for when the store loads so changing anything locally does not get updated. You can execute the onLoad method on the paging toolbar to trigger it to update itself.

varmaj80
6 Aug 2014, 6:36 AM
Thanks a lot for your suggestion, It worked.