C# Класс MvcPaging.PagerOptionsBuilder

Pager options builder class. Enables a fluent interface for adding options to the pager.
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
pagerOptions PagerOptions

Открытые методы

Метод Описание
Action ( string action ) : PagerOptionsBuilder

Set the action name for the pager links. Note that we're always using the current controller.

AddRouteValue ( string name, object value ) : PagerOptionsBuilder

Add a custom route value parameter for the pager links.

AlwaysAddFirstPageNumber ( ) : PagerOptionsBuilder

Always add the page number to the generated link for the first page.

By default we don't add the page number for page 1 because it results in canonical links. Use this option to override this behaviour.

DisplayFirstAndLastPage ( ) : PagerOptionsBuilder

Displays both first and last navigation pages.

DisplayFirstPage ( ) : PagerOptionsBuilder

Displays the first navigation page but not the last.

DisplayLastPage ( ) : PagerOptionsBuilder

Displays the last navigation page but not the first.

DisplayTemplate ( string displayTemplate ) : PagerOptionsBuilder

Set the name of the DisplayTemplate view to use for rendering.

The view must have a model of IEnumerable<PaginationModel>

HidePreviousAndNextPage ( ) : PagerOptionsBuilder
MaxNrOfPages ( int maxNrOfPages ) : PagerOptionsBuilder

Set the maximum number of pages to show. The default is 10.

PageRouteValueKey ( string pageRouteValueKey ) : PagerOptionsBuilder

Set the page routeValue key for pagination links

PagerOptionsBuilder ( PagerOptions pagerOptions ) : System
RouteValues ( RouteValueDictionary routeValues ) : PagerOptionsBuilder

Set custom route value parameters for the pager links.

RouteValues ( object routeValues ) : PagerOptionsBuilder

Set custom route value parameters for the pager links.

SetFirstPageText ( string firstPageText ) : PagerOptionsBuilder

Set the text for first page navigation.

SetFirstPageTitle ( string firstPageTitle ) : PagerOptionsBuilder

Set the title for first page navigation.

SetLastPageText ( string lastPageText ) : PagerOptionsBuilder

Set the text for last page navigation.

SetLastPageTitle ( string lastPageTitle ) : PagerOptionsBuilder

Set the title for last page navigation.

SetNextPageText ( string nextPageText ) : PagerOptionsBuilder

Set the text for next page navigation.

SetNextPageTitle ( string nextPageTitle ) : PagerOptionsBuilder

Set the title for next page navigation.

SetPreviousPageText ( string previousPageText ) : PagerOptionsBuilder

Set the text for previous page navigation.

SetPreviousPageTitle ( string previousPageTitle ) : PagerOptionsBuilder

Set the title for previous page navigation.

UseItemCountAsPageCount ( ) : PagerOptionsBuilder

Indicate that the total item count means total page count. This option is for scenario's where certain backends don't return the number of total items, but the number of pages.

Приватные методы

Метод Описание
AjaxOptions ( System.Web.Mvc.Ajax.AjaxOptions ajaxOptions ) : PagerOptionsBuilder

Set the AjaxOptions.

Описание методов

Action() публичный Метод

Set the action name for the pager links. Note that we're always using the current controller.
public Action ( string action ) : PagerOptionsBuilder
action string
Результат PagerOptionsBuilder

AddRouteValue() публичный Метод

Add a custom route value parameter for the pager links.
public AddRouteValue ( string name, object value ) : PagerOptionsBuilder
name string
value object
Результат PagerOptionsBuilder

AlwaysAddFirstPageNumber() публичный Метод

Always add the page number to the generated link for the first page.
By default we don't add the page number for page 1 because it results in canonical links. Use this option to override this behaviour.
public AlwaysAddFirstPageNumber ( ) : PagerOptionsBuilder
Результат PagerOptionsBuilder

DisplayFirstAndLastPage() публичный Метод

Displays both first and last navigation pages.
public DisplayFirstAndLastPage ( ) : PagerOptionsBuilder
Результат PagerOptionsBuilder

DisplayFirstPage() публичный Метод

Displays the first navigation page but not the last.
public DisplayFirstPage ( ) : PagerOptionsBuilder
Результат PagerOptionsBuilder

DisplayLastPage() публичный Метод

Displays the last navigation page but not the first.
public DisplayLastPage ( ) : PagerOptionsBuilder
Результат PagerOptionsBuilder

DisplayTemplate() публичный Метод

Set the name of the DisplayTemplate view to use for rendering.
The view must have a model of IEnumerable<PaginationModel>
public DisplayTemplate ( string displayTemplate ) : PagerOptionsBuilder
displayTemplate string
Результат PagerOptionsBuilder

HidePreviousAndNextPage() публичный Метод

public HidePreviousAndNextPage ( ) : PagerOptionsBuilder
Результат PagerOptionsBuilder

MaxNrOfPages() публичный Метод

Set the maximum number of pages to show. The default is 10.
public MaxNrOfPages ( int maxNrOfPages ) : PagerOptionsBuilder
maxNrOfPages int
Результат PagerOptionsBuilder

PageRouteValueKey() публичный Метод

Set the page routeValue key for pagination links
public PageRouteValueKey ( string pageRouteValueKey ) : PagerOptionsBuilder
pageRouteValueKey string
Результат PagerOptionsBuilder

PagerOptionsBuilder() публичный Метод

public PagerOptionsBuilder ( PagerOptions pagerOptions ) : System
pagerOptions PagerOptions
Результат System

RouteValues() публичный Метод

Set custom route value parameters for the pager links.
public RouteValues ( RouteValueDictionary routeValues ) : PagerOptionsBuilder
routeValues RouteValueDictionary
Результат PagerOptionsBuilder

RouteValues() публичный Метод

Set custom route value parameters for the pager links.
public RouteValues ( object routeValues ) : PagerOptionsBuilder
routeValues object
Результат PagerOptionsBuilder

SetFirstPageText() публичный Метод

Set the text for first page navigation.
public SetFirstPageText ( string firstPageText ) : PagerOptionsBuilder
firstPageText string
Результат PagerOptionsBuilder

SetFirstPageTitle() публичный Метод

Set the title for first page navigation.
public SetFirstPageTitle ( string firstPageTitle ) : PagerOptionsBuilder
firstPageTitle string
Результат PagerOptionsBuilder

SetLastPageText() публичный Метод

Set the text for last page navigation.
public SetLastPageText ( string lastPageText ) : PagerOptionsBuilder
lastPageText string
Результат PagerOptionsBuilder

SetLastPageTitle() публичный Метод

Set the title for last page navigation.
public SetLastPageTitle ( string lastPageTitle ) : PagerOptionsBuilder
lastPageTitle string
Результат PagerOptionsBuilder

SetNextPageText() публичный Метод

Set the text for next page navigation.
public SetNextPageText ( string nextPageText ) : PagerOptionsBuilder
nextPageText string
Результат PagerOptionsBuilder

SetNextPageTitle() публичный Метод

Set the title for next page navigation.
public SetNextPageTitle ( string nextPageTitle ) : PagerOptionsBuilder
nextPageTitle string
Результат PagerOptionsBuilder

SetPreviousPageText() публичный Метод

Set the text for previous page navigation.
public SetPreviousPageText ( string previousPageText ) : PagerOptionsBuilder
previousPageText string
Результат PagerOptionsBuilder

SetPreviousPageTitle() публичный Метод

Set the title for previous page navigation.
public SetPreviousPageTitle ( string previousPageTitle ) : PagerOptionsBuilder
previousPageTitle string
Результат PagerOptionsBuilder

UseItemCountAsPageCount() публичный Метод

Indicate that the total item count means total page count. This option is for scenario's where certain backends don't return the number of total items, but the number of pages.
public UseItemCountAsPageCount ( ) : PagerOptionsBuilder
Результат PagerOptionsBuilder

Описание свойств

pagerOptions защищенное свойство

protected PagerOptions pagerOptions
Результат PagerOptions