New to Telerik UI for ASP.NET MVC? Start a free 30-day trial

Defines the fluent interface for configuring Pageable

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Type Parameters:

TBuilder

Syntax:

C#
public abstract class PageableBuilder<TBuilder> where TBuilder : PageableBuilder<TBuilder>

Inheritance: objectPageableBuilder<TBuilder>

Derived Classes: GridPageableSettingsBuilderTreeListPageableSettingsBuilderListViewPageableBuilder

Inherited Members object.GetType()object.MemberwiseClone()object.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()...

Constructors

Initializes a new instance of the PageableBuilder class.

C#
public PageableBuilder(PageableSettings pager)
Parameters:pagerPageableSettings

The pager.

Methods

Specifies a value whether the page sizes dropdown will be adaptive.

C#
public TBuilder AdaptiveMode(AdaptiveMode adaptiveMode)
Parameters:adaptiveModeAdaptiveModeReturns:

TBuilder

Example:
C#
.Pageable(pageable =&gt; {
pageable.AdaptiveMode(AdaptiveMode.Auto);
})

Specifies a template used to populate the value of the aria-label attribute of the pager element.The parameters available for the template are: page - The current page. or totalPages - The total number of pages..

C#
public TBuilder ARIATemplate(string value)
Parameters:valuestring

The value that configures the ariatemplate.

Returns:

TBuilder

Example:
C#
.Pageable(pageable =&gt; {
pageable.ARIATemplate("Current page is #=page#");
})

The template that renders the content of the aria-label attribute.

C#
public TBuilder ARIATemplateHandler(string value)
Parameters:valuestring

The JavaScript function that will return the template content.

Returns:

TBuilder

Example:
C#
.Pageable(pageable =&gt; {
pageable.ARIATemplateHandler("ariaTemplate");
})

Specifies a template used to populate the value of the aria-label attribute of the pager element.The parameters available for the template are: page - The current page. or totalPages - The total number of pages..

C#
public TBuilder ARIATemplateId(string value)
Parameters:valuestring

The value that configures the ariatemplate.

Returns:

TBuilder

Example:
C#
.Pageable(pageable =&gt; {
pageable.ARIATemplateId("ariaTemplate");
})

Specifies a template used to populate the value of the aria-label attribute of the pager element.The parameters available for the template are: page - The current page. or totalPages - The total number of pages..

C#
public TBuilder ARIATemplateView(MvcHtmlString value)
Parameters:valueMvcHtmlString

The view that configures the ariatemplate.

Returns:

TBuilder

Example:
C#
.Pageable(pageable =&gt; {
pageable.ARIATemplateView(Html.Partial("TemplateView"));
})

Sets the number of buttons displayed in the numeric pager. Default is 10.

C#
public TBuilder ButtonCount(int value)
Parameters:valueint

The value

Returns:

TBuilder

Example:
C#
.Pageable(pageable =&gt; {
pageable.ButtonCount(5);
})

Enables or disables paging.

C#
public TBuilder Enabled(bool value)
Parameters:valuebool

The value that configures the paging.

Returns:

TBuilder

The Enabled method is useful when you need to enable paging based on certain conditions.

Example:
C#
.Pageable(pageable =&gt; {
pageable.Enabled(false);
})

Defines if a label showing current paging information will be displayed.

C#
public TBuilder Info(bool enabled)
Parameters:enabledbool

The value that determines whether the paging information will be shown

Returns:

TBuilder

Example:
C#
.Pageable(pageable =&gt; {
pageable.Info(false);
})

Defines if an input element which allows the user to navigate to given page will be displayed.

C#
public TBuilder Input(bool enabled)
Parameters:enabledbool

The value that enables or disables the input element

Returns:

TBuilder

Example:
C#
.Pageable(pageable =&gt; {
pageable.Input(false);
})

Configures the messages.

C#
public TBuilder Messages(Action<PageableMessagesBuilder> configurator)
Parameters:configuratorAction<PageableMessagesBuilder>

The value that configures the responsive.

Returns:

TBuilder

Example:
C#
.Pageable(pageable =&gt; {
pageable.Messages(messages =&gt; messages.AllPages("All"));
})

If set to true the user could navigate the widget using the keyboard navigation. By default keyboard navigation is disabled.

C#
public TBuilder Navigatable(bool value)
Parameters:valuebool

The value that configures the navigatable.

Returns:

TBuilder

Example:
C#
.Pageable(pageable =&gt; {
pageable.Navigatable(true);
})

Defines if the numeric portion of the pager will be shown.

C#
public TBuilder Numeric(bool enabled)
Parameters:enabledbool

The value that determines whether the numeric section will be shown

Returns:

TBuilder

Example:
C#
.Pageable(pageable =&gt; {
pageable.Numeric(true);
})

Sets the page sizes of the grid.

C#
public TBuilder PageSizes(bool enabled)
Parameters:enabledbool

A value indicating whether to enable the page sizes dropdown

Returns:

TBuilder

Example:
C#
.Pageable(pageable =&gt; {
pageable.PageSizes(true);
})

Sets the page sizes of the grid.

C#
public TBuilder PageSizes(IEnumerable pageSizes)
Parameters:pageSizesIEnumerable

The values shown in the pageSize dropdown

Returns:

TBuilder

Example:
C#
.Pageable(pageable =&gt; {
pageable.PageSizes(new int[] { 10, 20, 50 });
})

Defines if the Previous and Next buttons will be displayed.

C#
public TBuilder PreviousNext(bool enabled)
Parameters:enabledboolReturns:

TBuilder

Defines if a refresh button will be displayed.

C#
public TBuilder Refresh(bool enabled)
Parameters:enabledbool

The value that enables or disables the refresh button

Returns:

TBuilder

Example:
C#
.Pageable(pageable =&gt; {
pageable.Refresh(false);
})

If set to false the pager will not be responsive. By default the pager is responsive.

C#
public TBuilder Responsive(bool enabled)
Parameters:enabledbool

The value that configures the responsive.

Returns:

TBuilder

Example:
C#
.Pageable(pageable =&gt; {
pageable.Responsive(false);
})