When you need to load a large dataset there are a number of options available to enhance the experience for the user and reduce load on the server. A paging toolbar (Ext.toolbar.Paging
) enables you to request that a limited number of records returned from the server. The toolbar will then display a series of buttons to allow the user to move from page to page.
In this recipe, we will render a grid with a paging toolbar that loads a maximum of 50 records at a time.
We are going to use the Invoice example that we have used throughout this chapter. So we will start by including the Model file to our HTML page:
<script type="text/javascript" src="invoices-model.js"> </script>
Additionally, the Store will request data from invoices.php
, which is provided, to return 6,000 dynamically generated records and handle the requests from the client. For more information on creating the large dataset see Dealing with large datasets with an...