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

ASP.NET Core Grid Pager Functionality

Loading Demo...
  • EXAMPLE
  • VIEW SOURCE
  • Edit in Telerik REPL
HtmlHelper
TagHelper
Files:
pager_functionality.cshtml
Pager_FunctionalityController.cs
ProductViewModel.cs
Pager_Functionality_TagHelper.cshtml

Also available for:

CLIENT-SIDE API SERVER-SIDE API

Description

When it is possible to fit all Telerik UI for ASP.NET Core Grid data items into a single page, you may not need to show a pager.

The Data Grid toggles the pager visibility by using the .Pageable(pager => pager.AlwaysVisible(true)) method. By default, the component will show the pager even when the total amount of items in the DataSource is less than the PageSize.

If the 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 value, the pager will be hidden.
  • When the total amount of items initially set in the DataSource is greater than or equal to the PageSize value, the pager will be shown.
  • When the total amount of items in the DataSource becomes less than the PageSize value after a delete or filter operation, or a change in the PageSize, the pager will be hidden.
  • When the total amount of items in the DataSource becomes greater than or equal to the PageSize value after an insert or filter operation, or a change in the PageSize, the pager will be shown.

In this demo, the alwaysVisible checkbox enables or disables the pageable.alwaysVisible option for the Data Grid. To set the pager position to the top, use the position property of the pager—the pager on top checkbox changes the position of the Pager for the Grid.

Additional Apps

This Grid example is part of unique collection of hundreds of ASP.NET Core demos, with which you can see all Telerik ASP.NET Core components and their features in action. View the source code of the demos from the library or directly adapt, and edit them and their theme appearance in Telerik REPL for ASP.NET Core or ThemeBuilder.

Support & Learning Resources

Additional Resources