In wjigrid, by default, the grid displays in one continuous window. However, by setting allowPaging to true, you can divide large amounts of data into pages of a specified size for easier viewing. With paging enabled, users can move between pages using links or buttons above or below the grid.
By default, paging buttons display in the footer of the grid. You can use the position option to change the location of the paging button. You can use the pageSize option to set the number of records to show on each page. By default, it shows ten.
For example, the following script sets the pageSize option to 3 records, and sets the position option to "top."
You can select which buttons to display for paging by setting the pagerSettings mode option.
Setting | Description | Result |
---|---|---|
nextPrevious | Displays only Next and Previous buttons. | |
nextPreviousFirstLast | Displays Next, Previous, First, and Last buttons. | |
numeric (default) |
Displays numeric link buttons for direct access to each page. By default, ten page numbers display, but you can change the number in the pagerSettings pageButtonCount option. |
|
numericFirstLast |
Displays numeric buttons with First and Last buttons to either side. By default, ten page numbers display, but you can change the number in the pagerSettings pageButtonCount option. |
You can also localize or customize the tool tip text of the pager buttons. For more information, please see the Custom Grid Strings topic in the Localization section.