This tag sets the number of records rendered on an individual page of <netui-data:grid> data and renders the navigation links for moving between pages.
<netui-data:pager
action="string_action"
[pageSize="integer_pageSize"]
[renderInFooter="boolean_renderInFooter"]
[renderInHeader="boolean_renderInHeader"] />
This tag sets the number of records rendered on an individual
page of
<netui-data:grid>
data and renders the navigation links for moving between
pages. The navigation links can be rendered before the <netui-data:grid>
table, after the table,
or both by setting the renderInHeader
, renderInFooter
,
or both of these attributes, respectively.
The navigation links have the following default format:
Page # of # [Prev] [Next]
The "Page # of #" phrase is computed using the current page, the page size, and the data set size. If there is no data, the pager will read "Page 1 of 1". The "Prev" and "Next" links are optional depending on the size of the data set, the current page, and the page size. The rules are:
- If the first page is being rendered, the "Prev" link is not shown.
- If the last page is being rendered, the "Next" link is not shown.
- If there is only one page of data to render, neither link is shown.
<netui-data:grid dataSource="{pageFlow.allRows}" name="{pageFlow.gridName}"> <netui-data:gridStyle styleClassPrefix="gridStyle"/> <netui-data:pager pageSize="5" renderInHeader="true" action="pageAction" renderInFooter="true"/> <netui-data:columns filterAction="begin" sortAction="begin"> <netui-data:basicColumn filterable="true" title="Itemname" sortable="true" name="itemname"/> <netui-data:basicColumn filterable="true" title="Price" sortable="true" name="price"/> </netui-data:columns> </netui-data:grid>