New to Telerik UI for ASP.NET Core? Download free 30-day trial

Pager Functionality

Loading Demo...
  • EXAMPLE
  • VIEW SOURCE
  • Edit in Theme Builder
  • pager_functionality.cshtml
  • Pager_FunctionalityController.cs
  • ProductViewModel.cs

Also available for:

API REFERENCE

Description

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

Support & Learning Resources