New to Telerik UI for ASP.NET Core? Download free 30-day trial
Pager Functionality
- EXAMPLE
- VIEW SOURCE
-
EDIT IN TELERIK REPL
-
Change Theme
default
- Main
- Main Dark
- Nordic
- Ocean Blue
- Purple
- Turquoise
- Main
- Main Dark
- Nordic
- Urban
- Vintage
- Main
- Arctic
- Lime Dark
- Main Dark
- Nova
- Main
- Main Dark
- Opal
- Silver
Also available for:
CLIENT-SIDE API SERVER-SIDE APIDescription
It often turns out that all items in the ASP.NET Core Grid can fit into a single page and then showing the pager might not be necessary.
The Telerik for ASP.NET Core DataGrid toggles the pager visibility using the .Pageable(pager=>pager.AlwaysVisible(true))
method. By default the gridview will show the pager even when the total amount of items in the DataSource is less than the PageSize.
If value is set to false the behavior will be as follows:
- When the total amount of items initially set in the DataSource is less than the PageSize number the pager will be hidden.
- When the total amount of items initially set in the DataSource is greater than or equal to the PageSize number the pager will be shown.
- When the total amount of items in the DataSource becomes less than the PageSize number (after delete, filter operation or PageSize change) the pager will be hidden.
- When the total amount of items in the DataSource becomes greater than or equal to the PageSize number (after an insert, filter operation or PageSize change) the pager will be shown.
In the demo alwaysVisible checkbox enables/disables the pageable.alwaysVisible option for the grid.
In order to set the Pager position at top, use the position property of the Pager.
In the demo "pager on top" checkbox changes the position of the Pager for the grid.
More about Telerik Grid for ASP.NET Core