RadzenPager Class

A pagination component that provides navigation controls for paged data display. RadzenPager displays page numbers, navigation buttons, and optional page size selector for navigating through large datasets. Works standalone or integrated with data components like RadzenDataGrid and RadzenDataList. Provides navigation buttons (First/Previous/Next/Last page with customizable labels and icons), clickable page number buttons with configurable count, optional dropdown to change items per page, summary display ("Page X of Y" or custom summary text), alignment controls (left/center/right) via HorizontalAlign, compact or default spacing density, and ARIA labels for all buttons for accessibility. The PageChanged event provides Skip and Top values for loading the correct page of data. Use Count to specify total items, PageSize for items per page, and PageNumbersCount for visible page buttons.

Inheritance

Object

ComponentBase

RadzenComponent

RadzenPager

Implements

IComponent

IHandleEvent

IHandleAfterRender

Namespace: Radzen.Blazor

Assembly: Radzen.Blazor.dll

Syntax

public class RadzenPager : RadzenComponent, IComponent, IHandleEvent, IHandleAfterRender

Examples

Basic pager:

<RadzenPager Count=@totalCount PageSize="20" PageNumbersCount="5" PageChanged=@LoadPage />
@code {
    int totalCount = 250;
    async Task LoadPage(PagerEventArgs args) 
    {
        // Load items from args.Skip, take args.Top
    }
}

Pager with page size selector:

<RadzenPager Count=@totalCount PageSize=@pageSize PageSizeChanged=@OnPageSizeChanged
             PageSizeOptions=@(new int[] { 10, 20, 50, 100 }) ShowPagingSummary="true" />

Constructors

RadzenPagerlink

A pagination component that provides navigation controls for paged data display. RadzenPager displays page numbers, navigation buttons, and optional page size selector for navigating through large datasets. Works standalone or integrated with data components like RadzenDataGrid and RadzenDataList. Provides navigation buttons (First/Previous/Next/Last page with customizable labels and icons), clickable page number buttons with configurable count, optional dropdown to change items per page, summary display ("Page X of Y" or custom summary text), alignment controls (left/center/right) via HorizontalAlign, compact or default spacing density, and ARIA labels for all buttons for accessibility. The PageChanged event provides Skip and Top values for loading the correct page of data. Use Count to specify total items, PageSize for items per page, and PageNumbersCount for visible page buttons.

Declaration
public RadzenPager()

Fields

endPagelink

Gets or sets end page.

Declaration
protected int endPage

numberOfPageslink

Gets or sets number of pages.

Declaration
protected int numberOfPages

skiplink

Gets or sets number of recrods to skip.

Declaration
protected int skip

startPagelink

Gets or sets start page.

Declaration
protected int startPage

Properties

AlwaysVisiblelink

Gets or sets a value indicating whether pager is visible even when not enough data for paging.

Declaration
public bool AlwaysVisible { get; set; }
Property Value
Type Description
boolGets or sets a value indicating whether pager is visible even when not enough data for paging.

Countlink

Gets or sets the total items count.

Declaration
public int Count { get; set; }
Property Value
Type Description
intGets or sets the total items count.

CurrentPagelink

Gets the current page.

Declaration
public int CurrentPage { get; }
Property Value
Type Description
intGets the current page.

Densitylink

Gets or sets a value indicating Pager density.

Declaration
public Density Density { get; set; }
Property Value
Type Description
DensityGets or sets a value indicating Pager density.

FirstPageAriaLabellink

Gets or sets the pager's first page button's aria-label attribute.

Declaration
public string FirstPageAriaLabel { get; set; }
Property Value
Type Description
stringGets or sets the pager's first page button's aria-label attribute.

FirstPageTitlelink

Gets or sets the pager's first page button's title attribute.

Declaration
public string FirstPageTitle { get; set; }
Property Value
Type Description
stringGets or sets the pager's first page button's title attribute.

HorizontalAlignlink

Gets or sets the horizontal align.

Declaration
public HorizontalAlign HorizontalAlign { get; set; }
Property Value
Type Description
HorizontalAlignGets or sets the horizontal align.

LastPageAriaLabellink

Gets or sets the pager's last page button's aria-label attribute.

Declaration
public string LastPageAriaLabel { get; set; }
Property Value
Type Description
stringGets or sets the pager's last page button's aria-label attribute.

LastPageTitlelink

Gets or sets the pager's last page button's title attribute.

Declaration
public string LastPageTitle { get; set; }
Property Value
Type Description
stringGets or sets the pager's last page button's title attribute.

NavigationAriaLabellink

Gets or sets the navigation aria-label.

Declaration
public string NavigationAriaLabel { get; set; }
Property Value
Type Description
stringGets or sets the navigation aria-label.

NextPageAriaLabellink

Gets or sets the pager's next page button's aria-label attribute.

Declaration
public string NextPageAriaLabel { get; set; }
Property Value
Type Description
stringGets or sets the pager's next page button's aria-label attribute.

NextPageLabellink

Gets or sets the pager's optional next page button's label text.

Declaration
public string NextPageLabel { get; set; }
Property Value
Type Description
stringGets or sets the pager's optional next page button's label text.

NextPageTitlelink

Gets or sets the pager's next page button's title attribute.

Declaration
public string NextPageTitle { get; set; }
Property Value
Type Description
stringGets or sets the pager's next page button's title attribute.

PageAriaLabelFormatlink

Gets or sets the pager's numeric page number buttons' aria-label attributes.

Declaration
public string PageAriaLabelFormat { get; set; }
Property Value
Type Description
stringGets or sets the pager's numeric page number buttons' aria-label attributes.

PageChangedlink

Gets or sets the page changed callback.

Declaration
public EventCallback<PagerEventArgs> PageChanged { get; set; }
Property Value
Type Description
EventCallback<PagerEventArgs>Gets or sets the page changed callback.

PageNumbersCountlink

Gets or sets the page numbers count.

Declaration
public int PageNumbersCount { get; set; }
Property Value
Type Description
intGets or sets the page numbers count.

PageSizelink

Gets or sets the page size.

Declaration
public int PageSize { get; set; }
Property Value
Type Description
intGets or sets the page size.

PageSizeChangedlink

Gets or sets the page size changed callback.

Declaration
public EventCallback<int> PageSizeChanged { get; set; }
Property Value
Type Description
EventCallback<int>Gets or sets the page size changed callback.

PageSizeOptionslink

Gets or sets the page size options.

Declaration
public IEnumerable<int> PageSizeOptions { get; set; }
Property Value
Type Description
IEnumerable<int>Gets or sets the page size options.

PageSizeTextlink

Gets or sets the page size description text.

Declaration
public string PageSizeText { get; set; }
Property Value
Type Description
stringGets or sets the page size description text.

PageTitleFormatlink

Gets or sets the pager's numeric page number buttons' title attributes.

Declaration
public string PageTitleFormat { get; set; }
Property Value
Type Description
stringGets or sets the pager's numeric page number buttons' title attributes.

PagingSummaryFormatlink

Gets or sets the pager summary format. PagingSummaryTemplate has preference over this property.

Declaration
public string PagingSummaryFormat { get; set; }
Property Value
Type Description
stringGets or sets the pager summary format. PagingSummaryTemplate has preference over this property.

PagingSummaryTemplatelink

Gets or sets the pager summary template. Has preference over PagingSummaryFormat.

Declaration
public RenderFragment<PagingInformation> PagingSummaryTemplate { get; set; }
Property Value
Type Description
RenderFragment<PagingInformation>Gets or sets the pager summary template. Has preference over PagingSummaryFormat.

PrevPageAriaLabellink

Gets or sets the pager's previous page button's aria-label attribute.

Declaration
public string PrevPageAriaLabel { get; set; }
Property Value
Type Description
stringGets or sets the pager's previous page button's aria-label attribute.

PrevPageLabellink

Gets or sets the pager's optional previous page button's label text.

Declaration
public string PrevPageLabel { get; set; }
Property Value
Type Description
stringGets or sets the pager's optional previous page button's label text.

PrevPageTitlelink

Gets or sets the pager's previous page button's title attribute.

Declaration
public string PrevPageTitle { get; set; }
Property Value
Type Description
stringGets or sets the pager's previous page button's title attribute.

ShowPagingSummarylink

Gets or sets the pager summary visibility.

Declaration
public bool ShowPagingSummary { get; set; }
Property Value
Type Description
boolGets or sets the pager summary visibility.

Methods

BuildRenderTreelink

Declaration
protected override void BuildRenderTree(Rendering.RenderTreeBuilder __builder)
Parameters
Type Name Description
Rendering.RenderTreeBuilder __builder

CalculatePagerlink

Calculates the pager.

Declaration
protected void CalculatePager()

FirstPagelink

Goes to first page.

Declaration
public Task FirstPage(bool forceReload)
Parameters
Type Name Description
bool forceReload if set to true [force reload].
Returns
Type Description
Task

GetComponentCssClasslink

Declaration
protected override string GetComponentCssClass()
Returns
Type Description
string

GetPagelink

Gets the page.

Declaration
protected int GetPage()
Returns
Type Description
intSystem.Int32.

GetVisiblelink

Gets the visible.

Declaration
protected bool GetVisible()
Returns
Type Description
booltrue if XXXX, false otherwise.

GoToPagelink

Goes to specified page.

Declaration
public Task GoToPage(int page, bool forceReload)
Parameters
Type Name Description
int page The page.
bool forceReload if set to true [force reload].
Returns
Type Description
Task

LastPagelink

Goes to last page.

Declaration
public Task LastPage()
Returns
Type Description
Task

NextPagelink

Goes to next page.

Declaration
public Task NextPage()
Returns
Type Description
Task

OnAfterRenderAsynclink

Declaration
protected override Task OnAfterRenderAsync(bool firstRender)
Parameters
Type Name Description
bool firstRender
Returns
Type Description
Task

OnKeyDownlink

Handles the key down event.

Declaration
protected virtual Task OnKeyDown(KeyboardEventArgs args)
Parameters
Type Name Description
KeyboardEventArgs args The KeyboardEventArgs instance containing the event data.
Returns
Type Description
Task

OnPageSizeChangedlink

Called when page size changed.

Declaration
protected Task OnPageSizeChanged(object value)
Parameters
Type Name Description
object value The value.
Returns
Type Description
Task

OnParametersSetAsynclink

Called when parameters set asynchronous.

Declaration
protected override Task OnParametersSetAsync()
Returns
Type Description
TaskTask.

PrevPagelink

Goes to previous page.

Declaration
public Task PrevPage()
Returns
Type Description
Task

Reloadlink

Reloads this instance.

Declaration
public virtual Task Reload()
Returns
Type Description
Task
An error has occurred. This app may no longer respond until reloaded. Reload 🗙