C# Class MvcPaging.PagerOptionsBuilder

Pager options builder class. Enables a fluent interface for adding options to the pager.
Afficher le fichier Open project: martijnboland/MvcPaging

Protected Properties

Свойство Type Description
pagerOptions PagerOptions

Méthodes publiques

Méthode Description
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.

Private Methods

Méthode Description
AjaxOptions ( System.Web.Mvc.Ajax.AjaxOptions ajaxOptions ) : PagerOptionsBuilder

Set the AjaxOptions.

Method Details

Action() public méthode

Set the action name for the pager links. Note that we're always using the current controller.
public Action ( string action ) : PagerOptionsBuilder
action string
Résultat PagerOptionsBuilder

AddRouteValue() public méthode

Add a custom route value parameter for the pager links.
public AddRouteValue ( string name, object value ) : PagerOptionsBuilder
name string
value object
Résultat PagerOptionsBuilder

AlwaysAddFirstPageNumber() public méthode

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
Résultat PagerOptionsBuilder

DisplayFirstAndLastPage() public méthode

Displays both first and last navigation pages.
public DisplayFirstAndLastPage ( ) : PagerOptionsBuilder
Résultat PagerOptionsBuilder

DisplayFirstPage() public méthode

Displays the first navigation page but not the last.
public DisplayFirstPage ( ) : PagerOptionsBuilder
Résultat PagerOptionsBuilder

DisplayLastPage() public méthode

Displays the last navigation page but not the first.
public DisplayLastPage ( ) : PagerOptionsBuilder
Résultat PagerOptionsBuilder

DisplayTemplate() public méthode

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
Résultat PagerOptionsBuilder

HidePreviousAndNextPage() public méthode

public HidePreviousAndNextPage ( ) : PagerOptionsBuilder
Résultat PagerOptionsBuilder

MaxNrOfPages() public méthode

Set the maximum number of pages to show. The default is 10.
public MaxNrOfPages ( int maxNrOfPages ) : PagerOptionsBuilder
maxNrOfPages int
Résultat PagerOptionsBuilder

PageRouteValueKey() public méthode

Set the page routeValue key for pagination links
public PageRouteValueKey ( string pageRouteValueKey ) : PagerOptionsBuilder
pageRouteValueKey string
Résultat PagerOptionsBuilder

PagerOptionsBuilder() public méthode

public PagerOptionsBuilder ( PagerOptions pagerOptions ) : System
pagerOptions PagerOptions
Résultat System

RouteValues() public méthode

Set custom route value parameters for the pager links.
public RouteValues ( RouteValueDictionary routeValues ) : PagerOptionsBuilder
routeValues RouteValueDictionary
Résultat PagerOptionsBuilder

RouteValues() public méthode

Set custom route value parameters for the pager links.
public RouteValues ( object routeValues ) : PagerOptionsBuilder
routeValues object
Résultat PagerOptionsBuilder

SetFirstPageText() public méthode

Set the text for first page navigation.
public SetFirstPageText ( string firstPageText ) : PagerOptionsBuilder
firstPageText string
Résultat PagerOptionsBuilder

SetFirstPageTitle() public méthode

Set the title for first page navigation.
public SetFirstPageTitle ( string firstPageTitle ) : PagerOptionsBuilder
firstPageTitle string
Résultat PagerOptionsBuilder

SetLastPageText() public méthode

Set the text for last page navigation.
public SetLastPageText ( string lastPageText ) : PagerOptionsBuilder
lastPageText string
Résultat PagerOptionsBuilder

SetLastPageTitle() public méthode

Set the title for last page navigation.
public SetLastPageTitle ( string lastPageTitle ) : PagerOptionsBuilder
lastPageTitle string
Résultat PagerOptionsBuilder

SetNextPageText() public méthode

Set the text for next page navigation.
public SetNextPageText ( string nextPageText ) : PagerOptionsBuilder
nextPageText string
Résultat PagerOptionsBuilder

SetNextPageTitle() public méthode

Set the title for next page navigation.
public SetNextPageTitle ( string nextPageTitle ) : PagerOptionsBuilder
nextPageTitle string
Résultat PagerOptionsBuilder

SetPreviousPageText() public méthode

Set the text for previous page navigation.
public SetPreviousPageText ( string previousPageText ) : PagerOptionsBuilder
previousPageText string
Résultat PagerOptionsBuilder

SetPreviousPageTitle() public méthode

Set the title for previous page navigation.
public SetPreviousPageTitle ( string previousPageTitle ) : PagerOptionsBuilder
previousPageTitle string
Résultat PagerOptionsBuilder

UseItemCountAsPageCount() public méthode

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
Résultat PagerOptionsBuilder

Property Details

pagerOptions protected_oe property

protected PagerOptions pagerOptions
Résultat PagerOptions