gridx.modules.pagination.Pagination
Object » _Module » gridx.modules.pagination.Pagination
dojo.require("gridx.modules.pagination.Pagination");
Defined in gridx/modules/pagination/Pagination.js
This module does not include any UI buttons for pagination, so that various kinds of pagination UI implementations can benifit from this module.
Property Summary
Method Summary
- _onSizeChange(size)
- _updateBody(noRefresh)
- currentPage() returns Integer Get the index of current page.
- filterIndexesInPage(indexes, page) returns Integer[] Filter out the indexes that are in the given page.
- firstIndexInPage(page) returns Integer Get the index of the first row in the given page.
- getAPIPath()
- gotoPage(page) Set the current page
- indexInPage(index) returns Integer Get the row index in page by overall row index
- isAll() returns Boolean Check if the grid is currently showing all rows (page size set to 0).
- lastIndexInPage(page) returns Integer Get the index of the last row in the given page.
- load()
- pageCount() returns Integer Get the current count of pages.
- pageOfIndex(index) returns Integer Get the index of the page that the given row is in.
- pageSize() returns Integer Get current page size
- preload()
- setPageSize(size) Set page size (count of rows in one page)
Event Summary
- onChangePageSize() Fired when the page size is changed
- onSwitchPage() Fired when switched to another page.
Attached Objects
Properties
Methods
Overrides _Module
Returns Integer: The index of current page.
Get the index of current page.
Overrides _Module
Returns Integer[]: A subset of indexes that appear in the given page.
Filter out the indexes that are in the given page.
Parameter | Type | Description |
---|---|---|
indexes | Integer[] | An array of row indexes. |
page | Integer | A page index |
Overrides _Module
Returns Integer: The index of the first row in the page. If page is not valid, return -1.
Get the index of the first row in the given page.
Parameter | Type | Description |
---|---|---|
page | Integer | The index of a page. |
Overrides _Module
Returns Integer: The row index in page
Get the row index in page by overall row index
Parameter | Type | Description |
---|---|---|
index | Integer | The row index |
Overrides _Module
Returns Boolean: Whether the grid is showing all rows.
Check if the grid is currently showing all rows (page size set to 0).
Overrides _Module
Returns Integer: The index of the last row in the given page.
Get the index of the last row in the given page.
Parameter | Type | Description |
---|---|---|
page | Integer | The index of a page |
Overrides _Module
Returns Integer: The current count of pages.
Get the current count of pages.
Overrides _Module
Returns Integer: The page index
Get the index of the page that the given row is in.
Parameter | Type | Description |
---|---|---|
index | Integer | The row index |
Overrides _Module
Set page size (count of rows in one page)
Parameter | Type | Description |
---|---|---|
size | Integer | The new page size |