Fork me on GitHub

PagerOptions.ShowMorePagerItems property

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

Syntax:

public bool ShowMorePagerItems {get; set;}

Default value:

true

Example:

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

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

HtmlPager:

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

AjaxPager:

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

Live demo:

@Html.Pager(Model).Options(o=>o.HideMorePagerItems())
FirstPrev12345678910NextLast