Fork me on GitHub

PagerOptions.ShowDisabledPagerItems property

Gets or sets a value indicating whether the disabled pager items should be displayed.

Syntax:

public bool ShowDisabledPagerItems {get; set;}

Default value:

true

Example:

@Html.Pager(Model,new PagerOptions{ShowDisabledPagerItems=false})

This property value can be set to false via the Options method as bellow:

HtmlPager:

@Html.Pager(Model).Options(o=>o.HideDisabledPagerItems())

AjaxPager:

@Ajax.Pager(Model).Options(o=>o.HideDisabledPagerItems()).AjaxOptions(a=>a.SetUpdateTargetId("target"))

Live demo:

@Html.Pager(Model).Options(o=>o.HideDisabledPagerItems())
12345678910...NextLast