Fork me on GitHub

PagerOptions.AutoHide property

Gets or sets a value indicating whether MvcPager should be hidden if there's only one page of data.

Remarks:

MvcPage will not display any UI element if this property value is true and total item count of data to be paged is less than or equals to the value of page size.

Syntax:

public bool AutoHide {get; set;}

Default value:

true

Example:

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

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

HtmlPager:

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

AjaxPager:

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